From 14405a514581605497d88fb72c2e4fb45b359d4d Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 9 Dec 2014 20:56:42 +0000 Subject: Forward-port DCA footer fix from master. --- src/lib/ffmpeg.cc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/lib') diff --git a/src/lib/ffmpeg.cc b/src/lib/ffmpeg.cc index 4fe1c0448..c39ad8aab 100644 --- a/src/lib/ffmpeg.cc +++ b/src/lib/ffmpeg.cc @@ -152,7 +152,15 @@ FFmpeg::setup_decoders () AVCodec* codec = avcodec_find_decoder (context->codec_id); if (codec) { - if (avcodec_open2 (context, codec, 0) < 0) { + + /* This option disables decoding of DCA frame footers in our patched version + of FFmpeg. I believe these footers are of no use to us, and they can cause + problems when FFmpeg fails to decode them (mantis #352). + */ + AVDictionary* options = 0; + av_dict_set (&options, "disable_footer", "1", 0); + + if (avcodec_open2 (context, codec, &options) < 0) { throw DecodeError (N_("could not open decoder")); } } -- cgit v1.2.3