diff options
author | geneticdrift <geneticdrift@iotide.com> | 2014-02-07 12:54:03 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-02-07 12:07:43 +0100 |
commit | f225051348750cb9c2cf7ae632ad7950178e3675 (patch) | |
tree | 34e9eaf32c72439d00c9afc42eca0ea161733d78 | |
parent | b2e3fdef0f142eb0be9f14dccd934b6e41fbde16 (diff) | |
download | mpd-f225051348750cb9c2cf7ae632ad7950178e3675.tar.gz mpd-f225051348750cb9c2cf7ae632ad7950178e3675.tar.xz mpd-f225051348750cb9c2cf7ae632ad7950178e3675.zip |
fixed possible format_context not closed in ffmpeg_decode
Diffstat (limited to '')
-rw-r--r-- | src/decoder/plugins/FfmpegDecoderPlugin.cxx | 5 |
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; |