diff h264.c @ 6490:bb799e3bc64b libavcodec

If consumed does not match nalsize, favor nalsize. Fixes issue385.
author michael
date Thu, 13 Mar 2008 01:49:19 +0000
parents ecbe9565dcae
children 48759bfbd073
line wrap: on
line diff
--- a/h264.c	Thu Mar 13 00:20:15 2008 +0000
+++ b/h264.c	Thu Mar 13 01:49:19 2008 +0000
@@ -7495,8 +7495,10 @@
             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;