diff options
Diffstat (limited to 'src/decoder/plugins/FfmpegDecoderPlugin.cxx')
-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); |