summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Hervey <bilboed@bilboed.com>2007-06-14 10:23:20 +0000
committerEdward Hervey <bilboed@bilboed.com>2007-06-14 10:23:20 +0000
commit98165a69eeb1236c9aa189e24acbf8be442131d3 (patch)
tree39d0b9c34e06becb2ec02bdb27d9798790e103ca
parent2826212827b04ab9a9e26c2f057e45f0e6d6e14b (diff)
gst/qtdemux/qtdemux.c: For AMR-NB streams, export the AMRSpecificBox as codec_data on the caps.
Original commit message from CVS: * gst/qtdemux/qtdemux.c: (qtdemux_parse_trak): For AMR-NB streams, export the AMRSpecificBox as codec_data on the caps. Fixes #447458
-rw-r--r--ChangeLog7
-rw-r--r--gst/qtdemux/qtdemux.c15
2 files changed, 22 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index f49eab094..2abb83adf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2007-06-14 Edward Hervey <edward@fluendo.com>
+
+ * gst/qtdemux/qtdemux.c: (qtdemux_parse_trak):
+ For AMR-NB streams, export the AMRSpecificBox as codec_data on the
+ caps.
+ Fixes #447458
+
2007-06-13 Wim Taymans <wim@fluendo.com>
* gst/rtp/gstrtph264depay.c: (gst_rtp_h264_depay_setcaps):
diff --git a/gst/qtdemux/qtdemux.c b/gst/qtdemux/qtdemux.c
index ce3f18b13..1b1d9519d 100644
--- a/gst/qtdemux/qtdemux.c
+++ b/gst/qtdemux/qtdemux.c
@@ -3021,6 +3021,21 @@ qtdemux_parse_trak (GstQTDemux * qtdemux, GNode * trak)
"samplesize", G_TYPE_INT, samplesize, NULL);
break;
}
+ case FOURCC_samr:
+ {
+ 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);
+
+ gst_caps_set_simple (stream->caps,
+ "codec_data", GST_TYPE_BUFFER, buf, NULL);
+ gst_buffer_unref (buf);
+ }
+ break;
+ }
default:
break;
}