- if (codec == 0) {
- throw DecodeError (_("could not find audio decoder"));
- }
-
- if (avcodec_open2 (context, codec, 0) < 0) {
- throw DecodeError (N_("could not open audio decoder"));
+ if (codec) {
+
+ /* 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"));
+ }