This should fix all DTSC reading speed-related issues.

This commit is contained in:
Thulinma 2012-05-23 12:50:56 +02:00
parent 331fac9146
commit 9fb606aa4f
2 changed files with 14 additions and 8 deletions

View file

@ -27,9 +27,6 @@ namespace Converters{
bool doneheader = false;
while (std::cin.good()){
std::cin.read(charBuffer, 1024*10);
charCount = std::cin.gcount();
inBuffer.append(charBuffer, charCount);
if (Strm.parsePacket(inBuffer)){
if (!doneheader){
doneheader = true;
@ -48,6 +45,10 @@ namespace Converters{
if (FLV_out.DTSCLoader(Strm)){
std::cout.write(FLV_out.data, FLV_out.len);
}
}else{
std::cin.read(charBuffer, 1024*10);
charCount = std::cin.gcount();
inBuffer.append(charBuffer, charCount);
}
}