]> granicus.if.org Git - rtmpdump/commitdiff
Fix infinite loop on Error/Close
authorhyc <hyc@400ebc74-4327-4243-bc38-086b20814532>
Fri, 24 Dec 2010 22:35:35 +0000 (22:35 +0000)
committerhyc <hyc@400ebc74-4327-4243-bc38-086b20814532>
Fri, 24 Dec 2010 22:35:35 +0000 (22:35 +0000)
git-svn-id: svn://svn.mplayerhq.hu/rtmpdump/trunk@554 400ebc74-4327-4243-bc38-086b20814532

librtmp/rtmp.c

index db882dc9de03f329893b66d6bbed6680cd25a1c8..e6e8ed8a21c9894273dfd2996481450c626a993d 100644 (file)
@@ -3395,10 +3395,10 @@ RTMP_Close(RTMP *r)
     {
       if (r->m_stream_id > 0)
         {
-          if ((r->Link.protocol & RTMP_FEATURE_WRITE))
-           SendFCUnpublish(r);
          i = r->m_stream_id;
          r->m_stream_id = 0;
+          if ((r->Link.protocol & RTMP_FEATURE_WRITE))
+           SendFCUnpublish(r);
          SendDeleteStream(r, i);
        }
       if (r->m_clientID.av_val)