From 0a2fe723109c6a8fbb61ea5721b5a475e4b480d0 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 19 Apr 2017 09:24:59 +0100 Subject: Various fixes to seeking with audio. --- src/lib/ffmpeg_decoder.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/lib/ffmpeg_decoder.cc') diff --git a/src/lib/ffmpeg_decoder.cc b/src/lib/ffmpeg_decoder.cc index 604864a14..4635cd5a3 100644 --- a/src/lib/ffmpeg_decoder.cc +++ b/src/lib/ffmpeg_decoder.cc @@ -339,7 +339,9 @@ FFmpegDecoder::seek (ContentTime time, bool accurate) avcodec_flush_buffers (video_codec_context()); } - /* XXX: should be flushing audio buffers? */ + BOOST_FOREACH (shared_ptr i, ffmpeg_content()->ffmpeg_audio_streams()) { + avcodec_flush_buffers (i->stream(_format_context)->codec); + } if (subtitle_codec_context ()) { avcodec_flush_buffers (subtitle_codec_context ()); -- cgit v1.2.3