diff --git a/ChangeLog b/ChangeLog index fc211b5bbc..e6ae37ed88 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-11-26 Ronald S. Bultje + + * 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 * gst/playback/gstplaybin.c: (gen_video_element), diff --git a/ext/alsa/gstalsa.c b/ext/alsa/gstalsa.c index fa5119380c..7ff42c8a15 100644 --- a/ext/alsa/gstalsa.c +++ b/ext/alsa/gstalsa.c @@ -861,7 +861,7 @@ gst_alsa_get_caps (GstPad * pad) 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] = { @@ -894,7 +894,9 @@ gst_alsa_get_caps (GstPad * pad) 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 (); }