diff options
author | Max Kellermann <max@duempel.org> | 2014-08-29 20:52:39 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-08-29 21:40:15 +0200 |
commit | d9d97bd17bf0d9469dcf00120d3d3fdab87299bc (patch) | |
tree | d7abd9d0cbc6e417aaf4427740bf47207f47d7fa /src/decoder/plugins/FfmpegDecoderPlugin.cxx | |
parent | 94f6380d693b8bece655885d37495a3a73c78b62 (diff) | |
download | mpd-d9d97bd17bf0d9469dcf00120d3d3fdab87299bc.tar.gz mpd-d9d97bd17bf0d9469dcf00120d3d3fdab87299bc.tar.xz mpd-d9d97bd17bf0d9469dcf00120d3d3fdab87299bc.zip |
DecoderAPI: pass SignedSongTime to decoder_initialized()
Diffstat (limited to '')
-rw-r--r-- | src/decoder/plugins/FfmpegDecoderPlugin.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/decoder/plugins/FfmpegDecoderPlugin.cxx b/src/decoder/plugins/FfmpegDecoderPlugin.cxx index e328da24b..0693ffd43 100644 --- a/src/decoder/plugins/FfmpegDecoderPlugin.cxx +++ b/src/decoder/plugins/FfmpegDecoderPlugin.cxx @@ -514,9 +514,11 @@ ffmpeg_decode(Decoder &decoder, InputStream &input) return; } - int total_time = format_context->duration != (int64_t)AV_NOPTS_VALUE - ? format_context->duration / AV_TIME_BASE - : 0; + const SignedSongTime total_time = + format_context->duration != (int64_t)AV_NOPTS_VALUE + ? SignedSongTime::FromScale<uint64_t>(format_context->duration, + AV_TIME_BASE) + : SignedSongTime::Negative(); decoder_initialized(decoder, audio_format, input.IsSeekable(), total_time); |