[Ffmpeg-cvslog] r5467 - trunk/libavcodec/h264.c

lorenm subversion
Mon Jun 12 11:30:17 CEST 2006


Author: lorenm
Date: Mon Jun 12 11:30:17 2006
New Revision: 5467

Modified:
   trunk/libavcodec/h264.c

Log:
h264: accept rbsp_trailing longer than 1 byte



Modified: trunk/libavcodec/h264.c
==============================================================================
--- trunk/libavcodec/h264.c	(original)
+++ trunk/libavcodec/h264.c	Mon Jun 12 11:30:17 2006
@@ -7973,7 +7973,8 @@
       }
 
         ptr= decode_nal(h, buf + buf_index, &dst_length, &consumed, h->is_avc ? nalsize : buf_size - buf_index);
-        if(ptr[dst_length - 1] == 0) dst_length--;
+        while(ptr[dst_length - 1] == 0 && dst_length > 1)
+            dst_length--;
         bit_length= 8*dst_length - decode_rbsp_trailing(ptr + dst_length - 1);
 
         if(s->avctx->debug&FF_DEBUG_STARTCODE){




More information about the ffmpeg-cvslog mailing list