[FFmpeg-cvslog] avplay: reset decoder flush state when seeking
Justin Ruggles
git at videolan.org
Tue Feb 7 02:03:00 CET 2012
ffmpeg | branch: master | Justin Ruggles <justin.ruggles at gmail.com> | Sat Feb 4 17:32:26 2012 -0500| [ec1f3cab2061531d9b200213afeb5614f880d5d4] | committer: Justin Ruggles
avplay: reset decoder flush state when seeking
Fixes seeking after decoder has already been flushed for codecs using
CODEC_CAP_DELAY.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ec1f3cab2061531d9b200213afeb5614f880d5d4
---
avplay.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/avplay.c b/avplay.c
index f20b631..96551a6 100644
--- a/avplay.c
+++ b/avplay.c
@@ -2114,8 +2114,10 @@ static int audio_decode_frame(VideoState *is, double *pts_ptr)
if ((new_packet = packet_queue_get(&is->audioq, pkt, 1)) < 0)
return -1;
- if (pkt->data == flush_pkt.data)
+ if (pkt->data == flush_pkt.data) {
avcodec_flush_buffers(dec);
+ flush_complete = 0;
+ }
*pkt_temp = *pkt;
More information about the ffmpeg-cvslog
mailing list