From: Michael Smith Date: Tue, 23 Oct 2012 05:32:49 +0000 (-0700) Subject: qtdemux: with raw audio, set a default channel-mask for multichannel audio. X-Git-Tag: 1.19.3~509^2~6434 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=150bd97e963a572e627e8f3ce57704220e55a548;p=platform%2Fupstream%2Fgstreamer.git qtdemux: with raw audio, set a default channel-mask for multichannel audio. This doesn't actually parse 'chan' because it's absurdly complex. --- diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c index 42ab642..247a99b 100644 --- a/gst/isomp4/qtdemux.c +++ b/gst/isomp4/qtdemux.c @@ -5203,10 +5203,17 @@ gst_qtdemux_add_stream (GstQTDemux * qtdemux, gst_pad_new_from_static_template (&gst_qtdemux_audiosrc_template, name); g_free (name); if (stream->caps) { - /* FIXME: Need to set channel-mask here and maybe reorder */ gst_caps_set_simple (stream->caps, "rate", G_TYPE_INT, (int) stream->rate, "channels", G_TYPE_INT, stream->n_channels, NULL); + + if (stream->n_channels > 2) { + /* FIXME: Need to parse the 'chan' atom to get channel layouts + * correctly; this is just the minimum we can do - assume + * we don't actually have any channel positions. */ + gst_caps_set_simple (stream->caps, + "channel-mask", GST_TYPE_BITMASK, 0, NULL); + } } qtdemux->n_audio_streams++; } else if (stream->subtype == FOURCC_strm) {