From 5b24841f66e6c30b3015a76ace45202af7d245ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 4 Jul 2016 14:54:13 +0200 Subject: [PATCH] qtmux: Reject raw AAC caps without codec_data The resulting file is not going to be playable without guesswork and raw caps should always have codec_data. --- gst/isomp4/gstqtmux.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gst/isomp4/gstqtmux.c b/gst/isomp4/gstqtmux.c index d9e843b5fe..5cabb8f380 100644 --- a/gst/isomp4/gstqtmux.c +++ b/gst/isomp4/gstqtmux.c @@ -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);