pulse-server: Correctly unref sample

Decrease the actual ref counter, instead of the pointer
value.
This commit is contained in:
Georges Basile Stavracas Neto 2020-11-13 21:29:22 -03:00
parent 13a1049abf
commit ee82bfe5fb

View file

@ -66,7 +66,7 @@ static void sample_play_stream_destroy(void *data)
pw_log_info("destroy %s", p->sample->name);
spa_hook_remove(&p->listener);
p->stream = NULL;
if (--p->sample == 0)
if (--p->sample->ref == 0)
sample_free(p->sample);
p->sample = NULL;
}