vlc | branch: master | Thomas Guillem <[email protected]> | Thu Jul 30 13:27:03 
2015 +0200| [963fdfcfe226a69a64104fc7ed2966d53b11321c] | committer: Thomas 
Guillem

h264_nal: nal length size of 3 is not in the spec

cf. ISO/IEC 14496-15 5.2.4.1

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

 modules/packetizer/h264_nal.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/packetizer/h264_nal.c b/modules/packetizer/h264_nal.c
index 9ccc794..a998b6a 100644
--- a/modules/packetizer/h264_nal.c
+++ b/modules/packetizer/h264_nal.c
@@ -111,10 +111,11 @@ void convert_h264_to_annexb( uint8_t *p_buf, uint32_t 
i_len,
 {
     uint32_t nal_len = 0, nal_pos = 0;
 
-    if( i_nal_length_size < 3 || i_nal_length_size > 4 )
+    if( i_nal_length_size != 4 )
         return;
 
-    /* This only works for NAL sizes 3-4 */
+    /* This only works for a NAL length size of 4 */
+    /* TODO: realloc/memmove if i_nal_length_size is 2 or 1 */
     while( i_len > 0 )
     {
         if( nal_pos < i_nal_length_size ) {

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to