[rtmpdump] r204 - trunk/rtmpsuck.c
hyc
subversion at mplayerhq.hu
Thu Jan 7 08:35:36 CET 2010
Author: hyc
Date: Thu Jan 7 08:35:35 2010
New Revision: 204
Log:
Partially revert -r200, per-chunk sending is fragile at the moment
Modified:
trunk/rtmpsuck.c
Modified: trunk/rtmpsuck.c
==============================================================================
--- trunk/rtmpsuck.c Wed Jan 6 15:18:37 2010 (r203)
+++ trunk/rtmpsuck.c Thu Jan 7 08:35:35 2010 (r204)
@@ -744,7 +744,7 @@ void doServe(STREAMING_SERVER * server,
break;
}
- pc.m_header = hbuf;
+/* pc.m_header = hbuf; */
/* We have our own timeout in select() */
server->rc.Link.timeout = 10;
@@ -851,12 +851,10 @@ void doServe(STREAMING_SERVER * server,
}
if (cr)
{
- int n = pc.m_nBytesRead;
while (RTMP_ReadPacket(&server->rc, &pc))
- {
- int sendit = 1;
if (RTMPPacket_IsReady(&pc))
{
+ int sendit = 1;
if (paused)
{
if (pc.m_nTimeStamp <= server->rc.m_mediaStamp)
@@ -911,16 +909,11 @@ void doServe(STREAMING_SERVER * server,
server->f_cur = NULL;
}
}
- }
- if (sendit && RTMP_IsConnected(&server->rs))
- RTMP_SendChunk(&server->rs, &pc, n);
- if (RTMPPacket_IsReady(&pc))
- {
+ if (sendit && RTMP_IsConnected(&server->rs))
+ RTMP_SendPacket(&server->rs, &pc, false);
RTMPPacket_Free(&pc);
- pc.m_nBytesRead = 0;
+ break;
}
- break;
- }
}
if (!RTMP_IsConnected(&server->rs) && RTMP_IsConnected(&server->rc)
&& !server->f_cur)
More information about the rtmpdump
mailing list