[pulseaudio-commits] r1228 - in /trunk/src/pulsecore: cli-text.c protocol-native.c

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Sat Aug 12 10:06:40 PDT 2006


Author: lennart
Date: Sat Aug 12 19:06:39 2006
New Revision: 1228

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=1228&root=pulseaudio&view=rev
Log:
test if sink->monitor_source is set before making use of it

Modified:
    trunk/src/pulsecore/cli-text.c
    trunk/src/pulsecore/protocol-native.c

Modified: trunk/src/pulsecore/cli-text.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/pulsecore/cli-text.c?rev=1228&root=pulseaudio&r1=1227&r2=1228&view=diff
==============================================================================
--- trunk/src/pulsecore/cli-text.c (original)
+++ trunk/src/pulsecore/cli-text.c Sat Aug 12 19:06:39 2006
@@ -109,7 +109,7 @@
             sink->driver,
             pa_cvolume_snprint(cv, sizeof(cv), pa_sink_get_volume(sink, PA_MIXER_HARDWARE)),
             (double) pa_sink_get_latency(sink),
-            sink->monitor_source->index,
+            sink->monitor_source ? sink->monitor_source->index : PA_INVALID_INDEX,
             pa_sample_spec_snprint(ss, sizeof(ss), &sink->sample_spec),
             pa_channel_map_snprint(cm, sizeof(cm), &sink->channel_map));
 

Modified: trunk/src/pulsecore/protocol-native.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/pulsecore/protocol-native.c?rev=1228&root=pulseaudio&r1=1227&r2=1228&view=diff
==============================================================================
--- trunk/src/pulsecore/protocol-native.c (original)
+++ trunk/src/pulsecore/protocol-native.c Sat Aug 12 19:06:39 2006
@@ -1276,8 +1276,8 @@
         PA_TAG_U32, sink->owner ? sink->owner->index : PA_INVALID_INDEX,
         PA_TAG_CVOLUME, pa_sink_get_volume(sink, PA_MIXER_HARDWARE),
         PA_TAG_BOOLEAN, pa_sink_get_mute(sink, PA_MIXER_HARDWARE),
-        PA_TAG_U32, sink->monitor_source->index,
-        PA_TAG_STRING, sink->monitor_source->name,
+        PA_TAG_U32, sink->monitor_source ? sink->monitor_source->index : PA_INVALID_INDEX,
+        PA_TAG_STRING, sink->monitor_source ? sink->monitor_source->name : NULL,
         PA_TAG_USEC, pa_sink_get_latency(sink),
         PA_TAG_STRING, sink->driver,
         PA_TAG_U32,




More information about the pulseaudio-commits mailing list