diff options
author | Max Kellermann <max@duempel.org> | 2011-09-15 21:41:25 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2011-09-15 21:41:25 +0200 |
commit | 2ed870c8546ce4654f956beea60546260d98a85c (patch) | |
tree | 4685432fb9abc38de38bbe014af2e35cc172e99a /src/decoder | |
parent | ce35ba9ac99ed96c7f55c6d80e85fb9bfe1ed09e (diff) | |
download | mpd-2ed870c8546ce4654f956beea60546260d98a85c.tar.gz mpd-2ed870c8546ce4654f956beea60546260d98a85c.tar.xz mpd-2ed870c8546ce4654f956beea60546260d98a85c.zip |
decoder/ffmpeg: flush the codec after seeking
Let the codec start with fresh buffers. This should fix the remaining
seeking issues.
Diffstat (limited to 'src/decoder')
-rw-r--r-- | src/decoder/ffmpeg_decoder_plugin.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/decoder/ffmpeg_decoder_plugin.c b/src/decoder/ffmpeg_decoder_plugin.c index 77c1a122f..ba47b2c2c 100644 --- a/src/decoder/ffmpeg_decoder_plugin.c +++ b/src/decoder/ffmpeg_decoder_plugin.c @@ -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); |