1
0
Эх сурвалжийг харах

obs-outputs: Revert f1f49bc1 to fix RTMP authentication

This reverts commit f1f49bc197f44f1f20cb268da2f9fdcda82049a0, which
breaks RTMP authentication as these parameters are intended to "leak"
into the next use of the RTMP context.
Richard Stanway 7 жил өмнө
parent
commit
c68d022f9c

+ 6 - 6
plugins/obs-outputs/librtmp/rtmp.c

@@ -4519,14 +4519,14 @@ RTMP_Close(RTMP *r)
     r->m_customSendParam = NULL;
 
 #if defined(CRYPTO) || defined(USE_ONLY_MD5)
-    for (int idx = 0; idx < r->Link.nStreams; idx++)
-    {
-        free(r->Link.streams[idx].playpath.av_val);
-        r->Link.streams[idx].playpath.av_val = NULL;
-    }
-
     if (!(r->Link.protocol & RTMP_FEATURE_WRITE) || (r->Link.pFlags & RTMP_PUB_CLEAN))
     {
+        for (int idx = 0; idx < r->Link.nStreams; idx++)
+        {
+            free(r->Link.streams[idx].playpath.av_val);
+            r->Link.streams[idx].playpath.av_val = NULL;
+        }
+
         r->Link.curStreamIdx = 0;
         r->Link.nStreams = 0;
     }