decoder/ffmpeg: move code to IsSeekable(AVFormatContext)
This commit is contained in:
parent
85427826aa
commit
a9ad8fa505
@ -464,6 +464,12 @@ FfmpegCheckTag(DecoderClient &client, InputStream *is,
|
|||||||
client.SubmitTag(is, tag.Commit());
|
client.SubmitTag(is, tag.Commit());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool
|
||||||
|
IsSeekable(const AVFormatContext &format_context) noexcept
|
||||||
|
{
|
||||||
|
return (format_context.ctx_flags & AVFMTCTX_UNSEEKABLE) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
FfmpegDecode(DecoderClient &client, InputStream *input,
|
FfmpegDecode(DecoderClient &client, InputStream *input,
|
||||||
AVFormatContext &format_context)
|
AVFormatContext &format_context)
|
||||||
@ -521,7 +527,7 @@ FfmpegDecode(DecoderClient &client, InputStream *input,
|
|||||||
client.Ready(audio_format,
|
client.Ready(audio_format,
|
||||||
input
|
input
|
||||||
? input->IsSeekable()
|
? input->IsSeekable()
|
||||||
: (format_context.ctx_flags & AVFMTCTX_UNSEEKABLE) != 0,
|
: IsSeekable(format_context),
|
||||||
total_time);
|
total_time);
|
||||||
|
|
||||||
FfmpegParseMetaData(client, format_context, audio_stream);
|
FfmpegParseMetaData(client, format_context, audio_stream);
|
||||||
|
Loading…
Reference in New Issue
Block a user