]> code.delx.au - pulseaudio/blobdiff - src/pulsecore/protocol-native.c
remap: Make resampler's remap structure more self-contained
[pulseaudio] / src / pulsecore / protocol-native.c
index 662de9802cfdfb6f37bf69808b950ec5787262f0..41b4b505a2233245afb9f4b6442bfb8a4f0847d1 100644 (file)
@@ -3785,6 +3785,7 @@ static void command_set_volume(
                      pa_strnull(pa_proplist_gets(si->proplist, PA_PROP_MEDIA_NAME)));
         pa_sink_input_set_volume(si, &volume, true, true);
     } else if (so) {
+        CHECK_VALIDITY(c->pstream, so->volume_writable, tag, PA_ERR_BADSTATE);
         CHECK_VALIDITY(c->pstream, volume.channels == 1 || pa_cvolume_compatible(&volume, &so->sample_spec), tag, PA_ERR_INVALID);
 
         pa_log_debug("Client %s changes volume of source output %s.",
@@ -4745,7 +4746,7 @@ static void command_set_sink_or_source_port(pa_pdispatch *pd, uint32_t command,
     } else {
         pa_source *source;
 
-        pa_assert(command = PA_COMMAND_SET_SOURCE_PORT);
+        pa_assert(command == PA_COMMAND_SET_SOURCE_PORT);
 
         if (idx != PA_INVALID_INDEX)
             source = pa_idxset_get_by_index(c->protocol->core->sources, idx);
@@ -4780,6 +4781,7 @@ static void command_set_port_latency_offset(pa_pdispatch *pd, uint32_t command,
         pa_tagstruct_gets64(t, &offset) < 0 ||
         !pa_tagstruct_eof(t)) {
         protocol_error(c);
+        return;
     }
 
     CHECK_VALIDITY(c->pstream, c->authorized, tag, PA_ERR_ACCESS);