[rtmpdump] librtmp infinite loop

Steve McFarlin steve at stevemcfarlin.com
Fri Dec 24 23:29:22 CET 2010


On Dec 24, 2010, at 2:11 PM, Steve McFarlin wrote:

> Hello,
> 
> platform: darwin - iphone
> librtmp ver: latest package download and integrated into FFmpeg
> Setup: RTMP publish to server
> 
> Problem:
> 
> If the connection to the remote server is closed a SIGPIPE is raised. It is at this point librtmp will enter into an infinite loop. The loop trace is as follows (some error logs were added by me).
> 
> ERROR: WriteN, RTMP send error 32 (43 bytes)
> RTMP_Close
> RTMP_Close - Still connected 
> SendFCUnpublish
> RTMP_SendPacket
> ERROR: WriteN, RTMP send error 32 (43 bytes)
> RTMP_Close
> RTMP_Close - Still connected 
> SendFCUnpublish
> RTMP_SendPacket
> ERROR: WriteN, RTMP send error 32 (43 bytes)
> RTMP_Close
> RTMP_Close - Still connected 
> ....
> 
> 
> This will go on forever. I am currently investigating why this occurs. I will update if I find why.
> 
> 
> Steve
> _______________________________________________
> rtmpdump mailing list
> rtmpdump at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/rtmpdump


Simply adding the following code to rtmp.c::WriteN fixes the issue.

if (sockerr == EPIPE) {
    r->m_sb.sb_socket = -1;
}




More information about the rtmpdump mailing list