[vlc-devel] [PATCH 1/3] h264_nal: Make the p_nal_size parameter optional

Martin Storsjö martin at martin.st
Thu Sep 29 10:20:52 CEST 2011


---
 modules/codec/h264_nal.h |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/modules/codec/h264_nal.h b/modules/codec/h264_nal.h
index ce1c371..97e507b 100644
--- a/modules/codec/h264_nal.h
+++ b/modules/codec/h264_nal.h
@@ -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;
 
-- 
1.7.2.5




More information about the vlc-devel mailing list