[rtmpdump] [patch] Infinite loop on timeout
Antti Ajanki
antti.ajanki at iki.fi
Wed Aug 4 20:42:48 CEST 2010
Hi,
I noticed that the Download() function can end up in an infinite loop if
a timeout occurs because the loop does not check for
RTMP_IsTimedout(rtmp) condition.
Futhermore, to make the autoresume (the pause/unpause trick) work after
a timeout RTMP_ToggleStream() should reset r->m_read.status to 0.
Read_1_Packet() sets it to RTMP_READ_EOF on timeout. If it is not reset
all the following read operations (in particular, receiving the response
to the pause request) fail because RTMP_Read() returns without reading
anything when the status is non-zero.
The attached patch addresses both of these problems.
Antti
-------------- next part --------------
A non-text attachment was scrubbed...
Name: timeout.diff
Type: text/x-diff
Size: 804 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/rtmpdump/attachments/20100804/27c59144/attachment.diff>
More information about the rtmpdump
mailing list