You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
avplay: reset decoder flush state when seeking
Fixes seeking after decoder has already been flushed for codecs using CODEC_CAP_DELAY.
This commit is contained in:
4
avplay.c
4
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)
|
if ((new_packet = packet_queue_get(&is->audioq, pkt, 1)) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (pkt->data == flush_pkt.data)
|
if (pkt->data == flush_pkt.data) {
|
||||||
avcodec_flush_buffers(dec);
|
avcodec_flush_buffers(dec);
|
||||||
|
flush_complete = 0;
|
||||||
|
}
|
||||||
|
|
||||||
*pkt_temp = *pkt;
|
*pkt_temp = *pkt;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user