[FFmpeg-cvslog] r12430 - trunk/libavcodec/h264.c

michael subversion
Thu Mar 13 02:49:19 CET 2008


Author: michael
Date: Thu Mar 13 02:49:19 2008
New Revision: 12430

Log:
If consumed doesnt match nalsize favor nalsize.
Fixes issue385.


Modified:
   trunk/libavcodec/h264.c

Modified: trunk/libavcodec/h264.c
==============================================================================
--- trunk/libavcodec/h264.c	(original)
+++ trunk/libavcodec/h264.c	Thu Mar 13 02:49:19 2008
@@ -7495,8 +7495,10 @@ static int decode_nal_units(H264Context 
             av_log(h->s.avctx, AV_LOG_DEBUG, "NAL %d at %d/%d length %d\n", hx->nal_unit_type, buf_index, buf_size, dst_length);
         }
 
-        if (h->is_avc && (nalsize != consumed))
+        if (h->is_avc && (nalsize != consumed)){
             av_log(h->s.avctx, AV_LOG_ERROR, "AVC: Consumed only %d bytes instead of %d\n", consumed, nalsize);
+            consumed= nalsize;
+        }
 
         buf_index += consumed;
 




More information about the ffmpeg-cvslog mailing list