PulseAudio Marge Bot pushed to branch master at PulseAudio / pulseaudio
Commits: 49b07edc by Igor V. Kovalenko at 2021-08-06T22:45:16+03:00 alsa-mixer: Set mdev to NULL if there is no mapping We check if mapping is NULL but if so we never set mdev, set it to NULL as well. Fixes: 79cb1369fc4d22966cb65253e9da2ccda2f25b45 Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/615> - - - - - 1a575bb0 by Igor V. Kovalenko at 2021-08-06T22:45:26+03:00 rtp: Initialize adapter to NULL for early pipeline error If gstreamer pipeline immediately returns error, adapter pointer would not be initialized and pa_rtp_recv may crash calling gst_object_unref() on it. Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/615> - - - - - 3 changed files: - src/modules/alsa/alsa-sink.c - src/modules/alsa/alsa-source.c - src/modules/rtp/rtp-gstreamer.c Changes: ===================================== src/modules/alsa/alsa-sink.c ===================================== @@ -2121,8 +2121,7 @@ static void find_mixer(struct userdata *u, pa_alsa_mapping *mapping, const char u->mixers = pa_hashmap_new_full(pa_idxset_string_hash_func, pa_idxset_string_compare_func, NULL, (pa_free_cb_t) pa_alsa_mixer_free); - if (mapping) - mdev = pa_proplist_gets(mapping->proplist, "alsa.mixer_device"); + mdev = mapping ? pa_proplist_gets(mapping->proplist, "alsa.mixer_device") : NULL; if (mdev) { u->mixer_handle = pa_alsa_open_mixer_by_name(u->mixers, mdev, true); } else { ===================================== src/modules/alsa/alsa-source.c ===================================== @@ -1821,8 +1821,7 @@ static void find_mixer(struct userdata *u, pa_alsa_mapping *mapping, const char u->mixers = pa_hashmap_new_full(pa_idxset_string_hash_func, pa_idxset_string_compare_func, NULL, (pa_free_cb_t) pa_alsa_mixer_free); - if (mapping) - mdev = pa_proplist_gets(mapping->proplist, "alsa.mixer_device"); + mdev = mapping ? pa_proplist_gets(mapping->proplist, "alsa.mixer_device") : NULL; if (mdev) { u->mixer_handle = pa_alsa_open_mixer_by_name(u->mixers, mdev, false); } else { ===================================== src/modules/rtp/rtp-gstreamer.c ===================================== @@ -595,7 +595,7 @@ fail: int pa_rtp_recv(pa_rtp_context *c, pa_memchunk *chunk, pa_mempool *pool, uint32_t *rtp_tstamp, struct timeval *tstamp) { GstSample *sample = NULL; GstBufferList *buf_list; - GstAdapter *adapter; + GstAdapter *adapter = NULL; GstBuffer *buf; GstMapInfo info; GstClockTime timestamp = GST_CLOCK_TIME_NONE; View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/compare/da60f8af1d6e489686a798ddef89b02b3aed8214...1a575bb0a708bc455e977629cb99412551867982 -- View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/compare/da60f8af1d6e489686a798ddef89b02b3aed8214...1a575bb0a708bc455e977629cb99412551867982 You're receiving this email because of your account on gitlab.freedesktop.org.
