diff --git a/NEWS b/NEWS index ced9d58ff..93db797d6 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,7 @@ ver 0.23.7 (not yet released) * database - upnp: support pupnp 1.14 * decoder + - ffmpeg: fix HLS seeking - opus: fix missing song length on high-latency files * output - shout: require at least libshout 2.4.0 diff --git a/src/decoder/plugins/FfmpegDecoderPlugin.cxx b/src/decoder/plugins/FfmpegDecoderPlugin.cxx index f9915554a..d575a6eb1 100644 --- a/src/decoder/plugins/FfmpegDecoderPlugin.cxx +++ b/src/decoder/plugins/FfmpegDecoderPlugin.cxx @@ -471,7 +471,7 @@ static bool IsSeekable(const AVFormatContext &format_context) noexcept { #if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(58, 6, 100) - return (format_context.ctx_flags & AVFMTCTX_UNSEEKABLE) != 0; + return (format_context.ctx_flags & AVFMTCTX_UNSEEKABLE) == 0; #else (void)format_context; return false; @@ -533,9 +533,8 @@ FfmpegDecode(DecoderClient &client, InputStream *input, : FromFfmpegTimeChecked(format_context.duration, AV_TIME_BASE_Q); client.Ready(audio_format, - input - ? input->IsSeekable() - : IsSeekable(format_context), + (input ? input->IsSeekable() : false) + || IsSeekable(format_context), total_time); FfmpegParseMetaData(client, format_context, audio_stream);