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

librtmp: Remove reconnect on close behavior

For some reason librtmp treats a close message as a request to reconnect.
It does this syncronously, and uses the same event processing so that
another close request will continue the cycle until the stack is exhausted
and the application crashes.

Fixes https://obsproject.com/mantis/view.php?id=634
Richard Stanway 9 жил өмнө
parent
commit
4d23e84837

+ 4 - 1
plugins/obs-outputs/librtmp/rtmp.c

@@ -3104,7 +3104,10 @@ HandleInvoke(RTMP *r, const char *body, unsigned int nBodySize)
     {
         RTMP_Log(RTMP_LOGERROR, "rtmp server requested close");
         RTMP_Close(r);
-#if defined(CRYPTO) || defined(USE_ONLY_MD5)
+
+        // disabled this for now, if the server sends an rtmp close message librtmp
+        // will enter an infinite loop here until stack is exhausted.
+#if 0 && (defined(CRYPTO) || defined(USE_ONLY_MD5))
         if ((r->Link.protocol & RTMP_FEATURE_WRITE) &&
                 !(r->Link.pFlags & RTMP_PUB_CLEAN) &&
                 (  !(r->Link.pFlags & RTMP_PUB_NAME) ||