ffmpegcodecmap: don't create dummy codec data for FLAC decoder
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Mon, 26 Sep 2011 18:54:52 +0000 (19:54 +0100)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Mon, 26 Sep 2011 18:54:52 +0000 (19:54 +0100)
Since then it just errors out because it's too small, as it
wants the flac headers as codec data if there is codec data.

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

ext/ffmpeg/gstffmpegcodecmap.c

index 42cad1a..89bda3d 100644 (file)
@@ -2387,7 +2387,8 @@ gst_ffmpeg_caps_with_codecid (enum CodecID codec_id,
     }
 
     GST_DEBUG ("have codec data of size %d", size);
-  } else if (context->extradata == NULL && codec_id != CODEC_ID_AAC_LATM) {
+  } else if (context->extradata == NULL && codec_id != CODEC_ID_AAC_LATM &&
+      codec_id != CODEC_ID_FLAC) {
     /* no extradata, alloc dummy with 0 sized, some codecs insist on reading
      * extradata anyway which makes then segfault. */
     context->extradata =