decoder/ffmpeg: eliminate GetSampleFormat()
This commit is contained in:
@@ -105,13 +105,6 @@ ffmpeg_finish() noexcept
|
|||||||
av_dict_free(&avformat_options);
|
av_dict_free(&avformat_options);
|
||||||
}
|
}
|
||||||
|
|
||||||
gcc_pure
|
|
||||||
static AVSampleFormat
|
|
||||||
GetSampleFormat(const AVCodecParameters &codec_params) noexcept
|
|
||||||
{
|
|
||||||
return AVSampleFormat(codec_params.format);
|
|
||||||
}
|
|
||||||
|
|
||||||
gcc_pure
|
gcc_pure
|
||||||
static bool
|
static bool
|
||||||
IsAudio(const AVStream &stream) noexcept
|
IsAudio(const AVStream &stream) noexcept
|
||||||
@@ -695,7 +688,7 @@ FfmpegScanStream(AVFormatContext &format_context,
|
|||||||
const auto &codec_params = *stream.codecpar;
|
const auto &codec_params = *stream.codecpar;
|
||||||
try {
|
try {
|
||||||
handler.OnAudioFormat(CheckAudioFormat(codec_params.sample_rate,
|
handler.OnAudioFormat(CheckAudioFormat(codec_params.sample_rate,
|
||||||
ffmpeg_sample_format(GetSampleFormat(codec_params)),
|
ffmpeg_sample_format(AVSampleFormat(codec_params.format)),
|
||||||
codec_params.channels));
|
codec_params.channels));
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user