Several major bugfixes in FLV handling, multithreaded buffer now actually works (still crashes when multiple users connect, though... needs further "tweaking"), updated toolset.

This commit is contained in:
Thulinma 2012-04-10 16:26:30 +02:00
parent 4cd8641e50
commit 9b6e220b88
13 changed files with 564 additions and 328 deletions

View file

@ -304,28 +304,17 @@ namespace Connector_HTTP{
ss.write(stat);
}
}
ss.canRead();
switch (ss.ready()){
case -1:
conn.close();
#if DEBUG >= 1
fprintf(stderr, "Source socket is disconnected.\n");
#endif
break;
case 0: break;//not ready yet
default:
if (ss.iread(recBuffer)){
if (Strm.parsePacket(recBuffer)){
tag.DTSCLoader(Strm);
if (handler == HANDLER_FLASH){
FlashDynamic(tag, HTTP_S, conn, Strm);
}
if (handler == HANDLER_PROGRESSIVE){
Progressive(tag, HTTP_S, conn, Strm);
}
}
if (ss.canRead()){
ss.spool();
if (Strm.parsePacket(ss.Received())){
tag.DTSCLoader(Strm);
if (handler == HANDLER_FLASH){
FlashDynamic(tag, HTTP_S, conn, Strm);
}
break;
if (handler == HANDLER_PROGRESSIVE){
Progressive(tag, HTTP_S, conn, Strm);
}
}
}
}
}