decoder/ffmpeg: eliminate GetSampleFormat()

This commit is contained in:
Max Kellermann 2018-11-04 22:36:17 +01:00
parent 6c602811df
commit 793fd8c479
1 changed files with 1 additions and 8 deletions

View File

@ -105,13 +105,6 @@ ffmpeg_finish() noexcept
av_dict_free(&avformat_options);
}
gcc_pure
static AVSampleFormat
GetSampleFormat(const AVCodecParameters &codec_params) noexcept
{
return AVSampleFormat(codec_params.format);
}
gcc_pure
static bool
IsAudio(const AVStream &stream) noexcept
@ -695,7 +688,7 @@ FfmpegScanStream(AVFormatContext &format_context,
const auto &codec_params = *stream.codecpar;
try {
handler.OnAudioFormat(CheckAudioFormat(codec_params.sample_rate,
ffmpeg_sample_format(GetSampleFormat(codec_params)),
ffmpeg_sample_format(AVSampleFormat(codec_params.format)),
codec_params.channels));
} catch (...) {
}