Skip to content

Commit

Permalink
avplay: reset decoder flush state when seeking
Browse files Browse the repository at this point in the history
Fixes seeking after decoder has already been flushed for codecs using
CODEC_CAP_DELAY.
  • Loading branch information
justinruggles committed Feb 6, 2012
1 parent f1c3d4a commit ec1f3ca
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion avplay.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit ec1f3ca

Please sign in to comment.