qtmux: Reject raw AAC caps without codec_data
authorSebastian Dröge <sebastian@centricular.com>
Mon, 4 Jul 2016 12:54:13 +0000 (14:54 +0200)
committerSebastian Dröge <sebastian@centricular.com>
Mon, 4 Jul 2016 12:54:13 +0000 (14:54 +0200)
The resulting file is not going to be playable without guesswork and raw caps
should always have codec_data.

gst/isomp4/gstqtmux.c

index d9e843b..5cabb8f 100644 (file)
@@ -3509,9 +3509,10 @@ gst_qt_mux_audio_sink_set_caps (GstQTPad * qtpad, GstCaps * caps)
               "assuming 'raw'");
         }
 
-        if (!codec_data || gst_buffer_get_size ((GstBuffer *) codec_data) < 2)
+        if (!codec_data || gst_buffer_get_size ((GstBuffer *) codec_data) < 2) {
           GST_WARNING_OBJECT (qtmux, "no (valid) codec_data for AAC audio");
-        else {
+          goto refuse_caps;
+        } else {
           guint8 profile;
 
           gst_buffer_extract ((GstBuffer *) codec_data, 0, &profile, 1);