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 3e4e00a..db882dc 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 7aa19ab..c1cd95b 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;