Pārlūkot izejas kodu

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 gadi atpakaļ
vecāks
revīzija
4d23e84837
1 mainītis faili ar 4 papildinājumiem un 1 dzēšanām
  1. 4 1
      plugins/obs-outputs/librtmp/rtmp.c

+ 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) ||