aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/gstreamer/gst-plugins-base/fix-gstvolume.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/gstreamer/gst-plugins-base/fix-gstvolume.patch')
-rw-r--r--recipes/gstreamer/gst-plugins-base/fix-gstvolume.patch23
1 files changed, 23 insertions, 0 deletions
diff --git a/recipes/gstreamer/gst-plugins-base/fix-gstvolume.patch b/recipes/gstreamer/gst-plugins-base/fix-gstvolume.patch
new file mode 100644
index 00000000..d229e952
--- /dev/null
+++ b/recipes/gstreamer/gst-plugins-base/fix-gstvolume.patch
@@ -0,0 +1,23 @@
+diff --git a/gst/volume/gstvolume.c b/gst/volume/gstvolume.c
+index 0f5b362..94d03a3 100644
+--- a/gst/volume/gstvolume.c
++++ b/gst/volume/gstvolume.c
+@@ -314,10 +314,14 @@ volume_update_volume (GstVolume * self, gfloat volume,
+ self->current_mute = FALSE;
+ self->current_volume = volume;
+
+- self->current_vol_i8 = volume * VOLUME_UNITY_INT8;
+- self->current_vol_i16 = volume * VOLUME_UNITY_INT16;
+- self->current_vol_i24 = volume * VOLUME_UNITY_INT24;
+- self->current_vol_i32 = volume * VOLUME_UNITY_INT32;
++ self->current_vol_i8 =
++ (gint) ((gdouble) volume * (gdouble) VOLUME_UNITY_INT8);
++ self->current_vol_i16 =
++ (gint) ((gdouble) volume * (gdouble) VOLUME_UNITY_INT16);
++ self->current_vol_i24 =
++ (gint) ((gdouble) volume * (gdouble) VOLUME_UNITY_INT24);
++ self->current_vol_i32 =
++ (gint) ((gdouble) volume * (gdouble) VOLUME_UNITY_INT32);
+
+ passthrough = (self->current_vol_i16 == VOLUME_UNITY_INT16);
+ }