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.
This commit is contained in:
Ronald S. Bultje 2005-01-07 18:17:52 +00:00
parent a9c6d1d6c1
commit 97dd32f748
2 changed files with 10 additions and 3 deletions

View file

@ -1,3 +1,9 @@
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>

View file

@ -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,