Commit 2ed870c8 authored by Max Kellermann's avatar Max Kellermann

decoder/ffmpeg: flush the codec after seeking

Let the codec start with fresh buffers. This should fix the remaining seeking issues.
parent ce35ba9a
......@@ -459,8 +459,10 @@ ffmpeg_decode(struct decoder *decoder, struct input_stream *input)
if (av_seek_frame(format_context, audio_stream, where,
AV_TIME_BASE) < 0)
decoder_seek_error(decoder);
else
else {
avcodec_flush_buffers(codec_context);
decoder_command_finished(decoder);
}
}
} while (cmd != DECODE_COMMAND_STOP);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment