]>
Commit | Line | Data |
---|---|---|
ec5694de KK |
1 | From b743ce0a1dde67ecb36c64df87fca2b0a33ed835 Mon Sep 17 00:00:00 2001 |
2 | From: Krzysztof Krakowiak <krzysztof.krakowiak@gmail.com> | |
3 | Date: Wed, 23 Nov 2011 13:47:11 +0100 | |
4 | Subject: [PATCH] replaced broken if-return logic for fixating rate and number | |
5 | of channels that caused that modules were always(after | |
6 | successfull fixation of rate) played as mono (instead of | |
7 | stereo) by correct one with appropiate warnings. | |
8 | ||
9 | --- | |
10 | ext/modplug/gstmodplug.cc | 8 ++++---- | |
11 | 1 files changed, 4 insertions(+), 4 deletions(-) | |
12 | ||
13 | diff --git a/ext/modplug/gstmodplug.cc b/ext/modplug/gstmodplug.cc | |
14 | index 6faaa0c..74b3a79 100644 | |
15 | --- a/ext/modplug/gstmodplug.cc | |
16 | +++ b/ext/modplug/gstmodplug.cc | |
17 | @@ -466,10 +466,10 @@ gst_modplug_fixate (GstPad * pad, GstCaps * caps) | |
9dabacc7 KK |
18 | GstStructure *structure; |
19 | ||
20 | structure = gst_caps_get_structure (caps, 0); | |
21 | - if (gst_structure_fixate_field_nearest_int (structure, "rate", 44100)) | |
22 | - return; | |
23 | - if (gst_structure_fixate_field_nearest_int (structure, "channels", 2)) | |
ec5694de | 24 | - return; |
9dabacc7 | 25 | + if (!gst_structure_fixate_field_nearest_int (structure, "rate", 44100)) |
ec5694de KK |
26 | + GST_WARNING_OBJECT (pad, "Failed to fixate rate to 44100"); |
27 | + if (!gst_structure_fixate_field_nearest_int (structure, "channels", 2)) | |
28 | + GST_WARNING_OBJECT (pad, "Failed to fixate number of channels to stereo"); | |
9dabacc7 KK |
29 | } |
30 | ||
31 | static gboolean | |
ec5694de KK |
32 | -- |
33 | 1.7.7.3 | |
34 |