[FFmpeg-cvslog] r20784 - trunk/libavcodec/h264.c
michael
subversion
Wed Dec 9 13:49:59 CET 2009
Author: michael
Date: Wed Dec 9 13:49:59 2009
New Revision: 20784
Log:
End startcode prefix search at the end of a AVC unit.
Fixes issue1550.
Modified:
trunk/libavcodec/h264.c
Modified: trunk/libavcodec/h264.c
==============================================================================
--- trunk/libavcodec/h264.c Wed Dec 9 01:38:22 2009 (r20783)
+++ trunk/libavcodec/h264.c Wed Dec 9 13:49:59 2009 (r20784)
@@ -7521,7 +7521,7 @@ static int decode_nal_units(H264Context
next_avc= buf_index + nalsize;
} else {
// start code prefix search
- for(; buf_index + 3 < buf_size; buf_index++){
+ for(; buf_index + 3 < next_avc; buf_index++){
// This should always succeed in the first iteration.
if(buf[buf_index] == 0 && buf[buf_index+1] == 0 && buf[buf_index+2] == 1)
break;
@@ -7530,6 +7530,7 @@ static int decode_nal_units(H264Context
if(buf_index+3 >= buf_size) break;
buf_index+=3;
+ if(buf_index >= next_avc) continue;
}
hx = h->thread_context[context_count];
More information about the ffmpeg-cvslog
mailing list