fixed possible format_context not closed in ffmpeg_decode
This commit is contained in:
parent
b2e3fdef0f
commit
f225051348
|
@ -424,8 +424,11 @@ ffmpeg_decode(Decoder &decoder, InputStream &input)
|
|||
|
||||
const SampleFormat sample_format =
|
||||
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;
|
||||
}
|
||||
|
||||
Error error;
|
||||
AudioFormat audio_format;
|
||||
|
|
Loading…
Reference in New Issue