+2004-11-26 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
+
+ * ext/alsa/gstalsa.c: (gst_alsa_get_caps):
+ Don't omit the last (which incase of dmix is the only :) )
+ channel count. Don't set channels if <= 2.
+
2004-11-26 Christophe Fergeau <teuf@gnome.org>
* gst/playback/gstplaybin.c: (gen_video_element),
min_channels, max_channels);
/* channel configuration */
- for (n = min_channels; n < max_channels; n++) {
+ for (n = min_channels; n <= max_channels; n++) {
if (snd_pcm_hw_params_test_channels (this->handle, hw_params, n) == 0) {
GstStructure *str;
GstAudioChannelPosition pos[8] = {
if (pos[0] != GST_AUDIO_CHANNEL_POSITION_INVALID) {
str = gst_structure_copy (gst_caps_get_structure (caps, 0));
gst_structure_set (str, "channels", G_TYPE_INT, n, NULL);
- gst_audio_set_channel_positions (str, pos);
+ if (n > 2) {
+ gst_audio_set_channel_positions (str, pos);
+ }
if (!ret) {
ret = gst_caps_new_empty ();
}