aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-08-26 11:12:56 +0200
committerMax Kellermann <max@duempel.org>2014-08-26 11:15:53 +0200
commita606ef070013fa9752849b4f935e78f676168c4e (patch)
treee9a2a0fc7021873ad1d5289409ce89b3b59b8343 /src/decoder
parenta234de1ee309c3a074a9ab0c3441b60197ff27d7 (diff)
downloadmpd-a606ef070013fa9752849b4f935e78f676168c4e.tar.gz
mpd-a606ef070013fa9752849b4f935e78f676168c4e.tar.xz
mpd-a606ef070013fa9752849b4f935e78f676168c4e.zip
decoder/ffmpeg: use integer seek times
Diffstat (limited to 'src/decoder')
-rw-r--r--src/decoder/plugins/FfmpegDecoderPlugin.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/decoder/plugins/FfmpegDecoderPlugin.cxx b/src/decoder/plugins/FfmpegDecoderPlugin.cxx
index 40dd627b5..2787d3705 100644
--- a/src/decoder/plugins/FfmpegDecoderPlugin.cxx
+++ b/src/decoder/plugins/FfmpegDecoderPlugin.cxx
@@ -212,9 +212,9 @@ time_from_ffmpeg(int64_t t, const AVRational time_base)
gcc_const
static int64_t
-time_to_ffmpeg(double t, const AVRational time_base)
+time_to_ffmpeg(double t_ms, const AVRational time_base)
{
- return av_rescale_q((int64_t)(t * 1024), (AVRational){1, 1024},
+ return av_rescale_q(t_ms, (AVRational){1, 1000},
time_base);
}
@@ -547,7 +547,7 @@ ffmpeg_decode(Decoder &decoder, InputStream &input)
if (cmd == DecoderCommand::SEEK) {
int64_t where =
- time_to_ffmpeg(decoder_seek_where(decoder),
+ time_to_ffmpeg(decoder_seek_where_ms(decoder),
av_stream->time_base) +
start_time_fallback(*av_stream);