aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/plugins/FfmpegDecoderPlugin.cxx
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/decoder/plugins/FfmpegDecoderPlugin.cxx5
1 files changed, 4 insertions, 1 deletions
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;