aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2011-09-15 21:32:29 +0200
committerMax Kellermann <max@duempel.org>2011-09-15 21:32:29 +0200
commit724a59aaf7c396845bb5de7ad815c7ca842c2778 (patch)
treed96299ff9e101d3f6b1307abc5df9e70e4888cd5
parent42d8c2981f4e76fab5c4c3ed6ff840df7a41a1a4 (diff)
downloadmpd-724a59aaf7c396845bb5de7ad815c7ca842c2778.tar.gz
mpd-724a59aaf7c396845bb5de7ad815c7ca842c2778.tar.xz
mpd-724a59aaf7c396845bb5de7ad815c7ca842c2778.zip
decoder/ffmpeg: don't require key frame for seeking
Use flag AV_TIME_BASE.
Diffstat (limited to '')
-rw-r--r--NEWS1
-rw-r--r--src/decoder/ffmpeg_decoder_plugin.c3
2 files changed, 3 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 8abe0baae..9bd893930 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,7 @@ ver 0.16.5 (2010/??/??)
- rewind: reduce heap usage
* decoder:
- ffmpeg: higher precision timestamps
+ - ffmpeg: don't require key frame for seeking
ver 0.16.4 (2011/09/01)
diff --git a/src/decoder/ffmpeg_decoder_plugin.c b/src/decoder/ffmpeg_decoder_plugin.c
index 1a1598f36..f8c9db700 100644
--- a/src/decoder/ffmpeg_decoder_plugin.c
+++ b/src/decoder/ffmpeg_decoder_plugin.c
@@ -447,7 +447,8 @@ ffmpeg_decode(struct decoder *decoder, struct input_stream *input)
int64_t where =
decoder_seek_where(decoder) * AV_TIME_BASE;
- if (av_seek_frame(format_context, -1, where, 0) < 0)
+ if (av_seek_frame(format_context, -1, where,
+ AV_TIME_BASE) < 0)
decoder_seek_error(decoder);
else
decoder_command_finished(decoder);