diff options
Diffstat (limited to 'recipes/gstreamer/gstreamer1.0-plugins-base/fix-gstvolume.patch')
-rw-r--r-- | recipes/gstreamer/gstreamer1.0-plugins-base/fix-gstvolume.patch | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/recipes/gstreamer/gstreamer1.0-plugins-base/fix-gstvolume.patch b/recipes/gstreamer/gstreamer1.0-plugins-base/fix-gstvolume.patch new file mode 100644 index 0000000..f67a840 --- /dev/null +++ b/recipes/gstreamer/gstreamer1.0-plugins-base/fix-gstvolume.patch | |||
@@ -0,0 +1,23 @@ | |||
1 | diff --git a/gst/volume/gstvolume.c b/gst/volume/gstvolume.c | ||
2 | index 0f5b362..94d03a3 100644 | ||
3 | --- a/gst/volume/gstvolume.c | ||
4 | +++ b/gst/volume/gstvolume.c | ||
5 | @@ -250,10 +250,14 @@ volume_update_volume (GstVolume * self, const GstAudioInfo * info, | ||
6 | self->current_mute = FALSE; | ||
7 | self->current_volume = volume; | ||
8 | |||
9 | - self->current_vol_i8 = volume * VOLUME_UNITY_INT8; | ||
10 | - self->current_vol_i16 = volume * VOLUME_UNITY_INT16; | ||
11 | - self->current_vol_i24 = volume * VOLUME_UNITY_INT24; | ||
12 | - self->current_vol_i32 = volume * VOLUME_UNITY_INT32; | ||
13 | + self->current_vol_i8 = | ||
14 | + (gint) ((gdouble) volume * (gdouble) VOLUME_UNITY_INT8); | ||
15 | + self->current_vol_i16 = | ||
16 | + (gint) ((gdouble) volume * (gdouble) VOLUME_UNITY_INT16); | ||
17 | + self->current_vol_i24 = | ||
18 | + (gint) ((gdouble) volume * (gdouble) VOLUME_UNITY_INT24); | ||
19 | + self->current_vol_i32 = | ||
20 | + (gint) ((gdouble) volume * (gdouble) VOLUME_UNITY_INT32); | ||
21 | |||
22 | passthrough = (self->current_vol_i16 == VOLUME_UNITY_INT16); | ||
23 | } | ||