diff options
author | Ronald S. Bultje <rbultje@ronald.bitfreak.net> | 2005-04-21 19:07:07 +0000 |
---|---|---|
committer | Ronald S. Bultje <rbultje@ronald.bitfreak.net> | 2005-04-21 19:07:07 +0000 |
commit | bf8ac3f9c7293c49682b6f8c2d1497a1b69eec3f (patch) | |
tree | a4c711b02770f9ddcde762e85c619dd434c14b7a | |
parent | 4132559f94686557229f10cdba6ed5705fca33c4 (diff) | |
download | gst-plugins-bad-bf8ac3f9c7293c49682b6f8c2d1497a1b69eec3f.tar.gz gst-plugins-bad-bf8ac3f9c7293c49682b6f8c2d1497a1b69eec3f.tar.bz2 gst-plugins-bad-bf8ac3f9c7293c49682b6f8c2d1497a1b69eec3f.zip |
gst/qtdemux/qtdemux.c: Add extradata for ALAC.
Original commit message from CVS:
* gst/qtdemux/qtdemux.c: (qtdemux_parse_trak):
Add extradata for ALAC.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | gst/qtdemux/qtdemux.c | 21 |
2 files changed, 24 insertions, 2 deletions
@@ -1,3 +1,8 @@ +2005-04-21 Ronald S. Bultje <rbultje@ronald.bitfreak.net> + + * gst/qtdemux/qtdemux.c: (qtdemux_parse_trak): + Add extradata for ALAC. + 2005-04-21 Tim-Philipp Müller <tim at centricular dot net> * ext/cdio/cddasrc.c: (cddasrc_get): diff --git a/gst/qtdemux/qtdemux.c b/gst/qtdemux/qtdemux.c index 7d7e4a09..47699f98 100644 --- a/gst/qtdemux/qtdemux.c +++ b/gst/qtdemux/qtdemux.c @@ -2231,8 +2231,8 @@ qtdemux_parse_trak (GstQTDemux * qtdemux, GNode * trak) GST_TYPE_BUFFER, buffer, NULL); #endif } else { - if (QTDEMUX_FOURCC_GET (stsd->data + 16 + 4) == GST_MAKE_FOURCC ('Q', 'D', - 'M', '2')) { + if (QTDEMUX_FOURCC_GET (stsd->data + 16 + 4) == + GST_MAKE_FOURCC ('Q', 'D', 'M', '2')) { gint len = QTDEMUX_GUINT32_GET (stsd->data); if (len > 0x4C) { @@ -2244,6 +2244,23 @@ qtdemux_parse_trak (GstQTDemux * qtdemux, GNode * trak) "codec_data", GST_TYPE_BUFFER, buf, NULL); gst_buffer_unref (buf); } + gst_caps_set_simple (stream->caps, + "samplesize", G_TYPE_INT, samplesize, NULL); + } else if (QTDEMUX_FOURCC_GET (stsd->data + 16 + 4) == + GST_MAKE_FOURCC ('a', 'l', 'a', 'c')) { + gint len = QTDEMUX_GUINT32_GET (stsd->data); + + if (len > 0x34) { + GstBuffer *buf = gst_buffer_new_and_alloc (len - 0x34); + + memcpy (GST_BUFFER_DATA (buf), + (guint8 *) stsd->data + 0x34, len - 0x34); + gst_caps_set_simple (stream->caps, + "codec_data", GST_TYPE_BUFFER, buf, NULL); + gst_buffer_unref (buf); + } + gst_caps_set_simple (stream->caps, + "samplesize", G_TYPE_INT, samplesize, NULL); } } GST_INFO ("type " GST_FOURCC_FORMAT " caps %" GST_PTR_FORMAT, |