From 4db6dce2db0df67487f7a79a8e4689d13938ea37 Mon Sep 17 00:00:00 2001 From: Mark Nauwelaerts Date: Tue, 26 Apr 2011 16:06:56 +0200 Subject: [PATCH] qtdemux: also check for bitrate info in caps --- gst/isomp4/qtdemux.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c index 5f88db6ebd..9388a504cc 100644 --- a/gst/isomp4/qtdemux.c +++ b/gst/isomp4/qtdemux.c @@ -7055,11 +7055,21 @@ qtdemux_parse_trak (GstQTDemux * qtdemux, GNode * trak) } if (codec) { + GstStructure *s; + gint bitrate = 0; + list = gst_tag_list_new (); gst_tag_list_add (list, GST_TAG_MERGE_REPLACE, GST_TAG_AUDIO_CODEC, codec, NULL); g_free (codec); codec = NULL; + + /* some bitrate info may have ended up in caps */ + s = gst_caps_get_structure (stream->caps, 0); + gst_structure_get_int (s, "bitrate", &bitrate); + if (bitrate > 0) + gst_tag_list_add (list, GST_TAG_MERGE_REPLACE, GST_TAG_BITRATE, + bitrate, NULL); } mp4a = qtdemux_tree_get_child_by_type (stsd, FOURCC_mp4a);