qtdemux: Fix ALAC codec_data parsing

Fixes #604611
This commit is contained in:
Wim Taymans 2009-12-17 16:22:56 +01:00
parent 4063bb87e8
commit cc277b4a26
2 changed files with 5 additions and 4 deletions

View file

@ -3331,6 +3331,7 @@ qtdemux_parse_container (GstQTDemux * qtdemux, GNode * node, const guint8 * buf,
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 @@ qtdemux_parse_trak (GstQTDemux * qtdemux, GNode * trak)
{
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);

View file

@ -86,6 +86,7 @@ static const QtNodeType qt_node_types[] = {
{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},