Commit 97dd32f7 authored by Ronald S. Bultje's avatar Ronald S. Bultje
Browse files

gst/audioconvert/gstaudioconvert.c: The return value of fixate_to does not...

gst/audioconvert/gstaudioconvert.c: The return value of fixate_to does not imply that the requested value was set, so...

Original commit message from CVS:
* gst/audioconvert/gstaudioconvert.c: (gst_audio_convert_fixate):
The return value of fixate_to does not imply that the requested
value was set, so don't assume.
parent a9c6d1d6
2005-01-07 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* gst/audioconvert/gstaudioconvert.c: (gst_audio_convert_fixate):
The return value of fixate_to does not imply that the requested
value was set, so don't assume.
2005-01-07 Gergely Nagy <algernon@bonehunter.rulez.org>
 
Reviewed by: Ronald S. Bultje <rbultje@ronald.bitfreak.net>
......
......@@ -523,9 +523,10 @@ gst_audio_convert_fixate (GstPad * pad, const GstCaps * caps)
}
if (_fixate_caps_to_int (&copy, "channels", try.channels)) {
int n;
int n, c;
if (try.channels > 2) {
gst_structure_get_int (gst_caps_get_structure (copy, 0), "channels", &c);
if (c > 2) {
/* make sure we have a channelpositions structure or array here */
GstStructure *str;
......@@ -533,7 +534,7 @@ gst_audio_convert_fixate (GstPad * pad, const GstCaps * caps)
str = gst_caps_get_structure (copy, n);
if (!gst_structure_get_value (str, "channel-positions")) {
/* first try otherpad's positions, else anything */
if (ac_caps.pos != NULL) {
if (ac_caps.pos != NULL && c == ac_caps.channels) {
gst_audio_set_channel_positions (str, ac_caps.pos);
} else {
gst_audio_set_structure_channel_positions_list (str,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment