]> granicus.if.org Git - rtmpdump/commitdiff
Timeout fix from Antti Ajanki
authorhyc <hyc@400ebc74-4327-4243-bc38-086b20814532>
Tue, 26 Oct 2010 23:51:10 +0000 (23:51 +0000)
committerhyc <hyc@400ebc74-4327-4243-bc38-086b20814532>
Tue, 26 Oct 2010 23:51:10 +0000 (23:51 +0000)
git-svn-id: svn://svn.mplayerhq.hu/rtmpdump/trunk@552 400ebc74-4327-4243-bc38-086b20814532

librtmp/rtmp.c
rtmpdump.c

index 3e4e00a02d35656564506774621528635a42eb34..db882dc9de03f329893b66d6bbed6680cd25a1c8 100644 (file)
@@ -1019,6 +1019,9 @@ RTMP_ToggleStream(RTMP *r)
 
   if (!r->m_pausing)
     {
+      if (RTMP_IsTimedout(r) && r->m_read.status == RTMP_READ_EOF)
+        r->m_read.status = 0;
+
       res = RTMP_SendPause(r, TRUE, r->m_pauseStamp);
       if (!res)
        return res;
index 7aa19ab45d18afb7269dad253ea4af98827c3994..c1cd95b6e9830063a9d0e0a82cfaa8404637e6d0 100644 (file)
@@ -583,7 +583,7 @@ Download(RTMP * rtmp,               // connected RTMP object
 #endif
 
     }
-  while (!RTMP_ctrlC && nRead > -1 && RTMP_IsConnected(rtmp));
+  while (!RTMP_ctrlC && nRead > -1 && RTMP_IsConnected(rtmp) && !RTMP_IsTimedout(rtmp));
   free(buffer);
   if (nRead < 0)
     nRead = rtmp->m_read.status;