[rtmpdump] [patch] Infinite loop on timeout
Mikhail I. Izmestev
izmmishao5 at gmail.com
Wed Aug 4 21:08:24 CEST 2010
04.08.2010 22:42, Antti Ajanki wrote:
> Index: rtmpdump.c
> ===================================================================
> --- rtmpdump.c (revision 546)
> +++ rtmpdump.c (working copy)
> @@ -583,7 +583,7 @@
> #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;
Hi,
This looks very strange, maybe it must looks like:
Index: rtmpdump.c
===================================================================
--- rtmpdump.c (revision 546)
+++ rtmpdump.c (working copy)
@@ -583,7 +583,7 @@
#endif
}
- while (!RTMP_ctrlC && nRead > -1 && RTMP_IsConnected(rtmp));
+ while (!RTMP_ctrlC && nRead > 0 && RTMP_IsConnected(rtmp));
free(buffer);
if (nRead < 0)
nRead = rtmp->m_read.status;
Mikhail.
More information about the rtmpdump
mailing list