]> git.sesse.net Git - vlc/commitdiff
h264_nal: Make the p_nal_size parameter optional
authorMartin Storsjö <martin@martin.st>
Thu, 29 Sep 2011 08:20:52 +0000 (11:20 +0300)
committerJean-Baptiste Kempf <jb@videolan.org>
Thu, 29 Sep 2011 08:25:23 +0000 (10:25 +0200)
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
modules/codec/h264_nal.h

index ce1c371427852b41cfc132e5288d7b60c58ba7ab..97e507b91a471ace8aed67025f748e1db34dd14f 100644 (file)
@@ -37,7 +37,8 @@ static int convert_sps_pps( decoder_t *p_dec, const uint8_t *p_buf,
 
     /* Read infos in first 6 bytes */
     i_profile    = (p_buf[1] << 16) | (p_buf[2] << 8) | p_buf[3];
-    *p_nal_size  = (p_buf[4] & 0x03) + 1;
+    if (p_nal_size)
+        *p_nal_size  = (p_buf[4] & 0x03) + 1;
     p_buf       += 5;
     i_data_size -= 5;