decoder/ffmpeg: call TagHandler::OnAudioFormat()

This commit is contained in:
Max Kellermann 2018-07-07 13:02:08 +02:00
parent 72b6c09a73
commit d8b03d4927
1 changed files with 8 additions and 0 deletions

View File

@ -846,6 +846,14 @@ FfmpegScanStream(AVFormatContext &format_context,
handler.OnDuration(FromFfmpegTime(format_context.duration,
AV_TIME_BASE_Q));
const auto &codec_params = GetCodecParameters(stream);
try {
handler.OnAudioFormat(CheckAudioFormat(codec_params.sample_rate,
ffmpeg_sample_format(GetSampleFormat(codec_params)),
codec_params.channels));
} catch (...) {
}
FfmpegScanMetadata(format_context, audio_stream, handler);
return true;