Browse code

Favor container packets that end after the first byte of the access 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

Michael Niedermayer authored on 2009/03/03 00:12:26
Showing 1 changed files
... ...
@@ -96,6 +96,8 @@ void ff_fetch_timestamp(AVCodecParserContext *s, int off, int remove){
96 96
             s->offset = s->next_frame_offset - s->cur_frame_offset[i];
97 97
             if(remove)
98 98
                 s->cur_frame_offset[i]= INT64_MAX;
99
+            if(s->cur_offset + off < s->cur_frame_end[i])
100
+                break;
99 101
         }
100 102
     }
101 103
 }