modplug: fix modules playing as mono instead of stereo

replaced broken if-return logic for fixating rate and number
of channels that caused that modules were always (after
successful fixation of rate) played as mono (instead of
stereo) by correct one with appropiate warnings.

https://bugzilla.gnome.org/show_bug.cgi?id=619035
This commit is contained in:
Krzysztof Krakowiak 2011-11-23 13:47:11 +01:00 committed by Vincent Penquerc'h
parent 4bd5ef9bc5
commit 4286414e00

View file

@ -466,10 +466,10 @@ gst_modplug_fixate (GstPad * pad, GstCaps * caps)
GstStructure *structure;
structure = gst_caps_get_structure (caps, 0);
if (gst_structure_fixate_field_nearest_int (structure, "rate", 44100))
return;
if (gst_structure_fixate_field_nearest_int (structure, "channels", 2))
return;
if (!gst_structure_fixate_field_nearest_int (structure, "rate", 44100))
GST_WARNING_OBJECT (pad, "Failed to fixate rate to 44100");
if (!gst_structure_fixate_field_nearest_int (structure, "channels", 2))
GST_WARNING_OBJECT (pad, "Failed to fixate number of channels to stereo");
}
static gboolean