[vlc-commits] mediacodec: add missing alloc check

Thomas Guillem git at videolan.org
Wed Mar 29 15:49:45 CEST 2017


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Mar 23 16:05:56 2017 +0100| [04dbbe33efbcb58191c5e7ee25235ee11fa0362c] | committer: Thomas Guillem

mediacodec: add missing alloc check

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=04dbbe33efbcb58191c5e7ee25235ee11fa0362c
---

 modules/codec/omxil/mediacodec.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/codec/omxil/mediacodec.c b/modules/codec/omxil/mediacodec.c
index 2ee1293..3f8e25d 100644
--- a/modules/codec/omxil/mediacodec.c
+++ b/modules/codec/omxil/mediacodec.c
@@ -689,8 +689,9 @@ static int OpenDecoder(vlc_object_t *p_this, pf_MediaCodecApi_init pf_init)
             goto bailout;
 
     /* Set default CSD if ParseVideoExtra failed to configure one */
-    if (!p_sys->i_csd_count && p_dec->fmt_in.i_extra)
-        CSDDup(p_dec, p_dec->fmt_in.p_extra, p_dec->fmt_in.i_extra);
+    if (!p_sys->i_csd_count && p_dec->fmt_in.i_extra
+     && CSDDup(p_dec, p_dec->fmt_in.p_extra, p_dec->fmt_in.i_extra) != VLC_SUCCESS)
+        goto bailout;
 
     i_ret = StartMediaCodec(p_dec);
     switch (i_ret)



More information about the vlc-commits mailing list