decoder/ffmpeg: add "noexcept"

This commit is contained in:
Max Kellermann 2022-04-26 21:06:35 +02:00
parent 5c300a9f1a
commit 6bacb23002

View File

@ -366,7 +366,8 @@ ffmpeg_sample_format(enum AVSampleFormat sample_fmt) noexcept
} }
static void static void
FfmpegParseMetaData(AVDictionary &dict, ReplayGainInfo &rg, MixRampInfo &mr) FfmpegParseMetaData(AVDictionary &dict,
ReplayGainInfo &rg, MixRampInfo &mr) noexcept
{ {
AVDictionaryEntry *i = nullptr; AVDictionaryEntry *i = nullptr;
@ -382,7 +383,7 @@ FfmpegParseMetaData(AVDictionary &dict, ReplayGainInfo &rg, MixRampInfo &mr)
static void static void
FfmpegParseMetaData(const AVStream &stream, FfmpegParseMetaData(const AVStream &stream,
ReplayGainInfo &rg, MixRampInfo &mr) ReplayGainInfo &rg, MixRampInfo &mr) noexcept
{ {
if (stream.metadata != nullptr) if (stream.metadata != nullptr)
FfmpegParseMetaData(*stream.metadata, rg, mr); FfmpegParseMetaData(*stream.metadata, rg, mr);
@ -390,7 +391,7 @@ FfmpegParseMetaData(const AVStream &stream,
static void static void
FfmpegParseMetaData(const AVFormatContext &format_context, int audio_stream, FfmpegParseMetaData(const AVFormatContext &format_context, int audio_stream,
ReplayGainInfo &rg, MixRampInfo &mr) ReplayGainInfo &rg, MixRampInfo &mr) noexcept
{ {
assert(audio_stream >= 0); assert(audio_stream >= 0);
@ -403,7 +404,8 @@ FfmpegParseMetaData(const AVFormatContext &format_context, int audio_stream,
static void static void
FfmpegParseMetaData(DecoderClient &client, FfmpegParseMetaData(DecoderClient &client,
const AVFormatContext &format_context, int audio_stream) const AVFormatContext &format_context,
int audio_stream) noexcept
{ {
ReplayGainInfo rg; ReplayGainInfo rg;
rg.Clear(); rg.Clear();
@ -439,7 +441,7 @@ FfmpegScanMetadata(const AVFormatContext &format_context, int audio_stream,
static void static void
FfmpegScanTag(const AVFormatContext &format_context, int audio_stream, FfmpegScanTag(const AVFormatContext &format_context, int audio_stream,
TagBuilder &tag) TagBuilder &tag) noexcept
{ {
FullTagHandler h(tag); FullTagHandler h(tag);
FfmpegScanMetadata(format_context, audio_stream, h); FfmpegScanMetadata(format_context, audio_stream, h);
@ -451,7 +453,7 @@ FfmpegScanTag(const AVFormatContext &format_context, int audio_stream,
*/ */
static void static void
FfmpegCheckTag(DecoderClient &client, InputStream *is, FfmpegCheckTag(DecoderClient &client, InputStream *is,
AVFormatContext &format_context, int audio_stream) AVFormatContext &format_context, int audio_stream) noexcept
{ {
AVStream &stream = *format_context.streams[audio_stream]; AVStream &stream = *format_context.streams[audio_stream];
if ((stream.event_flags & AVSTREAM_EVENT_FLAG_METADATA_UPDATED) == 0) if ((stream.event_flags & AVSTREAM_EVENT_FLAG_METADATA_UPDATED) == 0)