From f225051348750cb9c2cf7ae632ad7950178e3675 Mon Sep 17 00:00:00 2001 From: geneticdrift Date: Fri, 7 Feb 2014 12:54:03 +0200 Subject: fixed possible format_context not closed in ffmpeg_decode --- src/decoder/plugins/FfmpegDecoderPlugin.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/decoder') diff --git a/src/decoder/plugins/FfmpegDecoderPlugin.cxx b/src/decoder/plugins/FfmpegDecoderPlugin.cxx index 66b3ec0c1..f2ad714bf 100644 --- a/src/decoder/plugins/FfmpegDecoderPlugin.cxx +++ b/src/decoder/plugins/FfmpegDecoderPlugin.cxx @@ -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; -- cgit v1.2.3