From 98165a69eeb1236c9aa189e24acbf8be442131d3 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Thu, 14 Jun 2007 10:23:20 +0000 Subject: 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 --- ChangeLog | 7 +++++++ gst/qtdemux/qtdemux.c | 15 +++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/ChangeLog b/ChangeLog index f49eab09..2abb83ad 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2007-06-14 Edward Hervey + + * 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 * gst/rtp/gstrtph264depay.c: (gst_rtp_h264_depay_setcaps): diff --git a/gst/qtdemux/qtdemux.c b/gst/qtdemux/qtdemux.c index ce3f18b1..1b1d9519 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; } -- cgit