# HG changeset patch # User michael # Date 1212412374 0 # Node ID 7c8df4f99d0870836fabbea83f2804445f6c7cfe # Parent 22a3d9efb4a262fec37c3a86a3ff65222d364cd2 Allow matching timestamps to be removed by fetch_timestamp(). diff -r 22a3d9efb4a2 -r 7c8df4f99d08 parser.c --- a/parser.c Mon Jun 02 13:09:56 2008 +0000 +++ b/parser.c Mon Jun 02 13:12:54 2008 +0000 @@ -76,7 +76,7 @@ return s; } -void ff_fetch_timestamp(AVCodecParserContext *s, int off){ +void ff_fetch_timestamp(AVCodecParserContext *s, int off, int remove){ int i; s->dts= s->pts= AV_NOPTS_VALUE; s->offset= 0; @@ -87,6 +87,8 @@ s->dts= s->cur_frame_dts[i]; s->pts= s->cur_frame_pts[i]; s->offset = s->next_frame_offset - s->cur_frame_offset[i]; + if(remove) + s->cur_frame_offset[i]= INT64_MAX; } } } @@ -142,7 +144,7 @@ s->fetch_timestamp=0; s->last_pts = s->pts; s->last_dts = s->dts; - ff_fetch_timestamp(s, 0); + ff_fetch_timestamp(s, 0, 0); } /* WARNING: the returned index can be negative */