Commit 1916eecc authored by Stefan Kost's avatar Stefan Kost
Browse files

volume: use a flag for 'mute' using the controller

Previously we checked mute_csource to determine wheter we need to premultiply
volumes and mute values. That fails as we unrefs mute_csource and set it to
NULL after. Use an extra flag instead.
parent 5e3f448a
......@@ -897,6 +897,7 @@ volume_transform_ip (GstBaseTransform * base, GstBuffer * outbuf)
guint nsamples = size / (width * channels);
GstClockTime interval = gst_util_uint64_scale_int (1, GST_SECOND, rate);
GstClockTime ts = GST_BUFFER_TIMESTAMP (outbuf);
gboolean use_mutes = FALSE;
ts = gst_segment_to_stream_time (&base->segment, GST_FORMAT_TIME, ts);
......@@ -918,6 +919,7 @@ volume_transform_ip (GstBaseTransform * base, GstBuffer * outbuf)
gst_object_unref (mute_csource);
mute_csource = NULL;
use_mutes = TRUE;
} else {
g_free (self->mutes);
self->mutes = NULL;
......@@ -937,7 +939,7 @@ volume_transform_ip (GstBaseTransform * base, GstBuffer * outbuf)
orc_memset_f64 (self->volumes, self->current_volume, nsamples);
}
if (mute_csource) {
if (use_mutes) {
orc_prepare_volumes (self->volumes, self->mutes, nsamples);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment