decoder/ffmpeg: eliminate GetSampleFormat()
This commit is contained in:
parent
6c602811df
commit
793fd8c479
|
@ -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 (...) {
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue