ffmpegdec: disable parser for already-parsed FLAC input
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Mon, 26 Sep 2011 18:55:54 +0000 (19:55 +0100)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Mon, 26 Sep 2011 18:55:54 +0000 (19:55 +0100)
Not needed to make anything work, just seems to make sense.

https://bugzilla.gnome.org/show_bug.cgi?id=589361

ext/ffmpeg/gstffmpegdec.c

index 0131ff0..395937d 100644 (file)
@@ -852,6 +852,12 @@ gst_ffmpegdec_setcaps (GstPad * pad, GstCaps * caps)
     }
   }
 
+  /* for FLAC, don't parse if it's already parsed */
+  if (oclass->in_plugin->id == CODEC_ID_FLAC) {
+    if (gst_structure_has_field (structure, "streamheader"))
+      ffmpegdec->turnoff_parser = TRUE;
+  }
+
   /* workaround encoder bugs */
   ffmpegdec->context->workaround_bugs |= FF_BUG_AUTODETECT;
   ffmpegdec->context->error_recognition = 1;