]> git.sesse.net Git - ffmpeg/commitdiff
avformat/asfdec: call ff_read_frame_flush() in asf_read_pts()
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 12 Aug 2013 20:52:23 +0000 (22:52 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 12 Aug 2013 20:52:23 +0000 (22:52 +0200)
flushing just the asf demuxer but not the cores buffers leads to inconsistencies
and a "random" packet position which later causes an assertion failure

Fixes Ticket2853

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/asfdec.c

index cffbcc4be0734213e3b0bfb55c69ed59548fc736..0d6370dc9ab043d4e6caf13e8fcb0aef7749080b 100644 (file)
@@ -1414,6 +1414,7 @@ static int64_t asf_read_pts(AVFormatContext *s, int stream_index,
     if (avio_seek(s->pb, pos, SEEK_SET) < 0)
         return AV_NOPTS_VALUE;
 
+    ff_read_frame_flush(s);
     asf_reset_header(s);
     for (;;) {
         if (av_read_frame(s, pkt) < 0) {