summaryrefslogtreecommitdiff
path: root/media-sound/pulseaudio-daemon/files/pulseaudio-16.0-fix-rtp-receiver-sdp-record.patch
blob: 3d72b9a009c47fd77842f7d510151e500f3f5c52 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
commit d7a633df899dda8738a30df318269e28c902e815
Author: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>
Date:   Mon Jun 13 21:38:08 2022 +0300

    rtp: Initialize SDP info struct field added for OPUS
    
    Turned out that pa_sdp_info::enable_opus is never initialized, which seldom
    makes module-rtp-recv believe it will be playing OPUS-encoded stream even though
    discovered SDP record does not indicate OPUS codec in metadata.
    
    Fix this by adding missing initializer.
    
    Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/720>

diff --git a/src/modules/rtp/sdp.c b/src/modules/rtp/sdp.c
index 4e6a442f8..bf131a27e 100644
--- a/src/modules/rtp/sdp.c
+++ b/src/modules/rtp/sdp.c
@@ -129,6 +129,7 @@ pa_sdp_info *pa_sdp_parse(const char *t, pa_sdp_info *i, int is_goodbye) {
     i->origin = i->session_name = NULL;
     i->salen = 0;
     i->payload = 255;
+    i->enable_opus = false;
 
     if (pa_startswith(t, PA_SDP_HEADER)) {
         t += sizeof(PA_SDP_HEADER) - 1;