diff --git a/src/pulse/scache.c b/src/pulse/scache.c index de7b41120..d393229b5 100644 --- a/src/pulse/scache.c +++ b/src/pulse/scache.c @@ -205,7 +205,7 @@ pa_operation *pa_context_play_sample(pa_context *c, const char *name, const char return o; } -pa_operation *pa_context_play_sample_with_proplist(pa_context *c, const char *name, const char *dev, pa_volume_t volume, pa_proplist *p, pa_context_play_sample_cb_t cb, void *userdata) { +pa_operation *pa_context_play_sample_with_proplist(pa_context *c, const char *name, const char *dev, pa_volume_t volume, const pa_proplist *p, pa_context_play_sample_cb_t cb, void *userdata) { pa_operation *o; pa_tagstruct *t; uint32_t tag; @@ -237,9 +237,9 @@ pa_operation *pa_context_play_sample_with_proplist(pa_context *c, const char *na if (p) pa_tagstruct_put_proplist(t, p); else { - p = pa_proplist_new(); - pa_tagstruct_put_proplist(t, p); - pa_proplist_free(p); + pa_proplist *empty_proplist = pa_proplist_new(); + pa_tagstruct_put_proplist(t, empty_proplist); + pa_proplist_free(empty_proplist); } pa_pstream_send_tagstruct(c->pstream, t); diff --git a/src/pulse/scache.h b/src/pulse/scache.h index e4b82bc7e..1be719837 100644 --- a/src/pulse/scache.h +++ b/src/pulse/scache.h @@ -116,7 +116,7 @@ pa_operation* pa_context_play_sample_with_proplist( const char *name /**< Name of the sample to play */, const char *dev /**< Sink to play this sample on */, pa_volume_t volume /**< Volume to play this sample with. Starting with 0.9.15 you may pass here PA_VOLUME_INVALID which will leave the decision about the volume to the server side, which is a good idea. */ , - pa_proplist *proplist /**< Property list for this sound. The property list of the cached entry will have this merged into it. */, + const pa_proplist *proplist /**< Property list for this sound. The property list of the cached entry will have this merged into it. */, pa_context_play_sample_cb_t cb /**< Call this function after successfully starting playback, or NULL */, void *userdata /**< Userdata to pass to the callback */);