From 8e39cf62e7f84eca6f8b431bf721281d50653892 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 18 Mar 2014 09:10:36 +0100 Subject: [PATCH] decoder/ffmpeg: pass AVSEEK_FLAG_ANY to av_seek_frame() This corrects a major mistake from commit 724a59aa - there was one small thing that commit was supposed to do, and it failed. AV_TIME_BASE is not a seek flag. --- NEWS | 1 + src/decoder/FfmpegDecoderPlugin.cxx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index e5f19470e..5abed4964 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,6 @@ ver 0.18.10 (not yet released) * decoder + - ffmpeg: fix seeking bug - gme: fix memory leak ver 0.18.9 (2014/03/02) diff --git a/src/decoder/FfmpegDecoderPlugin.cxx b/src/decoder/FfmpegDecoderPlugin.cxx index 593f42d39..e1e848bf3 100644 --- a/src/decoder/FfmpegDecoderPlugin.cxx +++ b/src/decoder/FfmpegDecoderPlugin.cxx @@ -496,7 +496,7 @@ ffmpeg_decode(Decoder &decoder, InputStream &input) av_stream->start_time; if (av_seek_frame(format_context, audio_stream, where, - AV_TIME_BASE) < 0) + AVSEEK_FLAG_ANY) < 0) decoder_seek_error(decoder); else { avcodec_flush_buffers(codec_context);