[rtmpdump] [PATCH 1/1] fix stopping stream near 4gb

Howard Chu hyc at highlandsun.com
Tue May 28 16:00:14 CEST 2013


Thomas Bernhard wrote:
> Hello,
>
> this patch should fix the problem described in the following thread:
> http://lists.mplayerhq.hu/pipermail/rtmpdump/2012-July/002047.html
>
> I think, the problem only occurs on Flash Media Server.
> The patch is tested on different streams on FMS 3.5.6 and Wowza.
>
> Thomas
>
> ---
>   librtmp/rtmp.c |    2 ++
>   1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/librtmp/rtmp.c b/librtmp/rtmp.c
> index 9c32bac..d7deabe 100644
> --- a/librtmp/rtmp.c
> +++ b/librtmp/rtmp.c
> @@ -1458,6 +1458,8 @@ ReadN(RTMP *r, char *buffer, int n)
>            r->m_sb.sb_size -= nRead;
>            nBytes = nRead;
>            r->m_nBytesIn += nRead;
> +         if(r->m_nBytesIn > 0xF0000000)
> +           r->m_nBytesIn = r->m_nBytesIn - 0xF0000000;
>            if (r->m_bSendCounter
>                && r->m_nBytesIn > ( r->m_nBytesInSent + r->m_nClientBW / 10))
>              if (!SendBytesReceived(r))
> --

Of course that should be "r->m_nBytesIn -= 0xF0000000;"



More information about the rtmpdump mailing list