Favor container packets that end after the first byte of the access
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 2 Mar 2009 15:12:26 +0000 (15:12 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 2 Mar 2009 15:12:26 +0000 (15:12 +0000)
unit in fetch_timestamp(). This should make no difference for valid
streams but may help invalid ones, also its needed for future changes.

Originally committed as revision 17732 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/parser.c

index c0a0095..9a9424f 100644 (file)
@@ -96,6 +96,8 @@ void ff_fetch_timestamp(AVCodecParserContext *s, int off, int remove){
             s->offset = s->next_frame_offset - s->cur_frame_offset[i];
             if(remove)
                 s->cur_frame_offset[i]= INT64_MAX;
+            if(s->cur_offset + off < s->cur_frame_end[i])
+                break;
         }
     }
 }