[vlc-commits] mediacodec: fix warning

Thomas Guillem git at videolan.org
Wed Oct 5 12:16:25 CEST 2016


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Oct  5 11:43:33 2016 +0200| [485b1cb4515017d62e0b180954b6007a9c09ed2a] | committer: Thomas Guillem

mediacodec: fix warning

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

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

diff --git a/modules/codec/omxil/mediacodec.c b/modules/codec/omxil/mediacodec.c
index b0afcc0..250f063 100644
--- a/modules/codec/omxil/mediacodec.c
+++ b/modules/codec/omxil/mediacodec.c
@@ -373,12 +373,13 @@ static int ParseVideoExtraHEVC(decoder_t *p_dec, uint8_t *p_extra, int i_extra)
     if (hevc_ishvcC(p_extra, i_extra))
     {
         struct csd csd;
-        csd.p_buf = hevc_hvcC_to_AnnexB_NAL(p_extra, i_extra, &csd.i_size,
-                                            &p_sys->u.video.i_nal_length_size);
-        if (csd.p_buf)
+        uint8_t *p_buf = hevc_hvcC_to_AnnexB_NAL(p_extra, i_extra, &csd.i_size,
+                                                 &p_sys->u.video.i_nal_length_size);
+        if (p_buf)
         {
+            csd.p_buf = p_buf;
             CSDDup(p_dec, &csd, 1);
-            free(csd.p_buf);
+            free(p_buf);
         }
     }
     /* FIXME: what to do with AnnexB ? */



More information about the vlc-commits mailing list