[vlc-commits] h264_nal: Make the p_nal_size parameter optional
Martin Storsjö
git at videolan.org
Thu Sep 29 10:25:27 CEST 2011
vlc | branch: master | Martin Storsjö <martin at martin.st> | Thu Sep 29 11:20:52 2011 +0300| [5359dc3135cde367302d724ddb42b7b0da708344] | committer: Jean-Baptiste Kempf
h264_nal: Make the p_nal_size parameter optional
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5359dc3135cde367302d724ddb42b7b0da708344
---
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;
More information about the vlc-commits
mailing list