Commit f2250513 authored by geneticdrift's avatar geneticdrift Committed by Max Kellermann

fixed possible format_context not closed in ffmpeg_decode

parent b2e3fdef
...@@ -424,8 +424,11 @@ ffmpeg_decode(Decoder &decoder, InputStream &input) ...@@ -424,8 +424,11 @@ ffmpeg_decode(Decoder &decoder, InputStream &input)
const SampleFormat sample_format = const SampleFormat sample_format =
ffmpeg_sample_format(codec_context->sample_fmt); ffmpeg_sample_format(codec_context->sample_fmt);
if (sample_format == SampleFormat::UNDEFINED) if (sample_format == SampleFormat::UNDEFINED) {
// (error message already done by ffmpeg_sample_format())
avformat_close_input(&format_context);
return; return;
}
Error error; Error error;
AudioFormat audio_format; AudioFormat audio_format;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment