diff options
author | Ronald S. Bultje <rbultje@ronald.bitfreak.net> | 2005-04-21 12:18:08 +0000 |
---|---|---|
committer | Ronald S. Bultje <rbultje@ronald.bitfreak.net> | 2005-04-21 12:18:08 +0000 |
commit | 870e521fe1c370146773c0a65bbff289e0250f44 (patch) | |
tree | 77ca0ccce19d9e4acc9ac240e8787b8a0307a8b0 | |
parent | 9568e3da3f28b85a0ca92d0a42d22f2af9951e77 (diff) | |
download | gst-plugins-bad-870e521fe1c370146773c0a65bbff289e0250f44.tar.gz gst-plugins-bad-870e521fe1c370146773c0a65bbff289e0250f44.tar.bz2 gst-plugins-bad-870e521fe1c370146773c0a65bbff289e0250f44.zip |
gst/qtdemux/qtdemux.c: Set correct extradata for QDM2.
Original commit message from CVS:
* gst/qtdemux/qtdemux.c: (qtdemux_parse_trak):
Set correct extradata for QDM2.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | gst/qtdemux/qtdemux.c | 15 |
2 files changed, 20 insertions, 0 deletions
@@ -1,3 +1,8 @@ +2005-04-21 Ronald S. Bultje <rbultje@ronald.bitfreak.net> + + * gst/qtdemux/qtdemux.c: (qtdemux_parse_trak): + Set correct extradata for QDM2. + 2005-04-21 Tim-Philipp Müller <tim at centricular dot net> * gst/speed/gstspeed.c: (speed_change_state): diff --git a/gst/qtdemux/qtdemux.c b/gst/qtdemux/qtdemux.c index b9350097..7d7e4a09 100644 --- a/gst/qtdemux/qtdemux.c +++ b/gst/qtdemux/qtdemux.c @@ -2230,6 +2230,21 @@ qtdemux_parse_trak (GstQTDemux * qtdemux, GNode * trak) gst_caps_set_simple (stream->caps, "codec_data", GST_TYPE_BUFFER, buffer, NULL); #endif + } else { + 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) { + GstBuffer *buf = gst_buffer_new_and_alloc (len - 0x4C); + + memcpy (GST_BUFFER_DATA (buf), + (guint8 *) stsd->data + 0x4C, len - 0x4C); + gst_caps_set_simple (stream->caps, + "codec_data", GST_TYPE_BUFFER, buf, NULL); + gst_buffer_unref (buf); + } + } } GST_INFO ("type " GST_FOURCC_FORMAT " caps %" GST_PTR_FORMAT, GST_FOURCC_ARGS (QTDEMUX_FOURCC_GET (stsd->data + 16 + 4)), |