decoder/ffmpeg: flush the codec after seeking

Let the codec start with fresh buffers.  This should fix the remaining
seeking issues.
This commit is contained in:
Max Kellermann 2011-09-15 21:41:25 +02:00
parent ce35ba9ac9
commit 2ed870c854

View File

@ -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);