matroskademux: Always set the channel mask for PCM streams

Just use the gst_audio_channel_get_fallback_mask function for now as
the specification is too complicated and nobody implements it.
This commit is contained in:
Thibault Saunier 2015-11-11 16:53:19 +01:00
parent 51f94288ce
commit 7b026e4bc0

View file

@ -5517,7 +5517,9 @@ gst_matroska_demux_audio_caps (GstMatroskaTrackAudioContext *
/* FIXME: Channel mask and reordering */
caps = gst_caps_new_simple ("audio/x-raw",
"format", G_TYPE_STRING, gst_audio_format_to_string (format),
"layout", G_TYPE_STRING, "interleaved", NULL);
"layout", G_TYPE_STRING, "interleaved",
"channel-mask", GST_TYPE_BITMASK,
gst_audio_channel_get_fallback_mask (audiocontext->channels), NULL);
*codec_name = g_strdup_printf ("Raw %d-bit PCM audio",
audiocontext->bitdepth);
@ -5532,7 +5534,9 @@ gst_matroska_demux_audio_caps (GstMatroskaTrackAudioContext *
/* FIXME: Channel mask and reordering */
caps = gst_caps_new_simple ("audio/x-raw",
"format", G_TYPE_STRING, format,
"layout", G_TYPE_STRING, "interleaved", NULL);
"layout", G_TYPE_STRING, "interleaved",
"channel-mask", GST_TYPE_BITMASK,
gst_audio_channel_get_fallback_mask (audiocontext->channels), NULL);
*codec_name = g_strdup_printf ("Raw %d-bit floating-point audio",
audiocontext->bitdepth);
context->alignment = audiocontext->bitdepth / 8;