[pulseaudio-commits] src/pulsecore
Peter Meerwald
pmeerw at kemper.freedesktop.org
Mon Aug 15 20:22:35 UTC 2016
src/pulsecore/sink-input.c | 10 ++++------
src/pulsecore/source-output.c | 10 ++++------
2 files changed, 8 insertions(+), 12 deletions(-)
New commits:
commit 0a5cff62416573b6f899e6c969a7dad6b2f15161
Author: Peter Meerwald-Stadler <pmeerw at pmeerw.net>
Date: Mon Aug 15 19:08:49 2016 +0200
sink-input,source-output: Fix logging, don't overwrite old_value when value == 0
diff --git a/src/pulsecore/sink-input.c b/src/pulsecore/sink-input.c
index 1ed5dda..435e63e 100644
--- a/src/pulsecore/sink-input.c
+++ b/src/pulsecore/sink-input.c
@@ -1433,13 +1433,11 @@ void pa_sink_input_set_property(pa_sink_input *i, const char *key, const char *v
if (pa_proplist_contains(i->proplist, key)) {
old_value = pa_xstrdup(pa_proplist_gets(i->proplist, key));
- if (value && old_value) {
- if (pa_streq(value, old_value))
- goto finish;
- } else {
- pa_xfree(old_value);
+ if (value && old_value && pa_streq(value, old_value))
+ goto finish;
+
+ if (!old_value)
old_value = pa_xstrdup("(data)");
- }
} else {
if (!value)
goto finish;
diff --git a/src/pulsecore/source-output.c b/src/pulsecore/source-output.c
index c70af7a..35ef1c5 100644
--- a/src/pulsecore/source-output.c
+++ b/src/pulsecore/source-output.c
@@ -1086,13 +1086,11 @@ void pa_source_output_set_property(pa_source_output *o, const char *key, const c
if (pa_proplist_contains(o->proplist, key)) {
old_value = pa_xstrdup(pa_proplist_gets(o->proplist, key));
- if (value && old_value) {
- if (pa_streq(value, old_value))
- goto finish;
- } else {
- pa_xfree(old_value);
+ if (value && old_value && pa_streq(value, old_value))
+ goto finish;
+
+ if (!old_value)
old_value = pa_xstrdup("(data)");
- }
} else {
if (!value)
goto finish;
More information about the pulseaudio-commits
mailing list