qtdemux: Fix ALAC codec_data parsing
Fixes #604611
diff --git a/gst/qtdemux/qtdemux.c b/gst/qtdemux/qtdemux.c
index 0246175..925ea07 100644
--- a/gst/qtdemux/qtdemux.c
+++ b/gst/qtdemux/qtdemux.c
@@ -3331,6 +3331,7 @@
child = g_node_new ((guint8 *) buf);
g_node_append (node, child);
+ GST_LOG_OBJECT (qtdemux, "adding new node of len %d", len);
qtdemux_parse_node (qtdemux, child, buf, len);
buf += len;
@@ -5278,10 +5279,9 @@
{
gint len = QT_UINT32 (stsd_data);
- if (len > 0x34) {
- GstBuffer *buf = gst_buffer_new_and_alloc (len - 0x34);
-
- memcpy (GST_BUFFER_DATA (buf), stsd_data + 0x34, len - 0x34);
+ if (len >= 132) {
+ GstBuffer *buf = gst_buffer_new_and_alloc (36);
+ memcpy (GST_BUFFER_DATA (buf), stsd_data + 88, 36);
gst_caps_set_simple (stream->caps,
"codec_data", GST_TYPE_BUFFER, buf, NULL);
gst_buffer_unref (buf);
diff --git a/gst/qtdemux/qtdemux_types.c b/gst/qtdemux/qtdemux_types.c
index ef79d1d..f740218 100644
--- a/gst/qtdemux/qtdemux_types.c
+++ b/gst/qtdemux/qtdemux_types.c
@@ -86,6 +86,7 @@
{FOURCC_colr, "colr", 0,},
{FOURCC_fiel, "fiel", 0,},
{FOURCC_jp2x, "jp2x", 0,},
+ {FOURCC_alac, "alac", 0,},
{FOURCC_wave, "wave", QT_FLAG_CONTAINER},
{FOURCC_appl, "appl", QT_FLAG_CONTAINER},
{FOURCC_esds, "esds", 0},