[vlc-commits] mediacodec: add missing error check for decoder_UpdateVideoFormat
Thomas Guillem
git at videolan.org
Thu Sep 3 14:30:23 CEST 2015
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Sep 1 17:53:40 2015 +0200| [ce8e113fc6d6be6277c0ce4498dc5f6fe2d38ee5] | committer: Thomas Guillem
mediacodec: add missing error check for decoder_UpdateVideoFormat
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ce8e113fc6d6be6277c0ce4498dc5f6fe2d38ee5
---
modules/codec/omxil/mediacodec.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/modules/codec/omxil/mediacodec.c b/modules/codec/omxil/mediacodec.c
index a774e5c..864f1ba 100644
--- a/modules/codec/omxil/mediacodec.c
+++ b/modules/codec/omxil/mediacodec.c
@@ -401,7 +401,14 @@ static int StartMediaCodec(decoder_t *p_dec)
p_dec->fmt_out.video.i_width = p_sys->u.video.i_width;
p_dec->fmt_out.video.i_height = p_sys->u.video.i_height;
p_dec->fmt_out.i_codec = VLC_CODEC_ANDROID_OPAQUE;
- decoder_UpdateVideoFormat(p_dec);
+ if (decoder_UpdateVideoFormat(p_dec) != 0)
+ {
+ msg_Err(p_dec, "Opaque Vout request failed: "
+ "fallback to non opaque");
+
+ AWindowHandler_destroy(p_sys->u.video.p_awh);
+ p_sys->u.video.p_awh = NULL;
+ }
}
}
args.video.p_awh = p_sys->u.video.p_awh;
More information about the vlc-commits
mailing list