Fixed invalid DTSC packets causing progressive processes to block indefinitely.

This commit is contained in:
Thulinma 2013-09-20 11:15:08 +02:00
parent 6e9f797847
commit 391f3cf174
4 changed files with 26 additions and 3 deletions

View file

@ -163,6 +163,12 @@ namespace Connector_HTTP {
if (Strm.lastType() == DTSC::PAUSEMARK){
conn.close();
}
if (Strm.lastType() == DTSC::INVALID){
#if DEBUG >= 3
fprintf(stderr, "Invalid packet received - closing connection.\n");
#endif
conn.close();
}
if (Strm.lastType() == DTSC::AUDIO || Strm.lastType() == DTSC::VIDEO){
std::string codec = Strm.getTrackById(Strm.getPacket()["trackid"].asInt())["codec"].asString();
if (codec == "AAC" || codec == "MP3" || codec == "H264"){

View file

@ -135,6 +135,12 @@ namespace Connector_HTTP {
if (Strm.lastType() == DTSC::PAUSEMARK){
conn.close();
}
if (Strm.lastType() == DTSC::INVALID){
#if DEBUG >= 3
fprintf(stderr, "Invalid packet received - closing connection.\n");
#endif
conn.close();
}
if (Strm.lastType() == DTSC::AUDIO){
conn.SendNow(Strm.lastData()); //write the MP3 contents
}

View file

@ -182,6 +182,12 @@ namespace Connector_HTTP {
//parse DTSC to MP4 here
conn.SendNow(Strm.lastData());//send out and clear Convverter buffer
}
if (Strm.lastType() == DTSC::INVALID){
#if DEBUG >= 3
fprintf(stderr, "Invalid packet received - closing connection.\n");
#endif
conn.close();
}
}
}else{
Util::sleep(1);

View file

@ -190,7 +190,12 @@ namespace Connector_HTTP {
if (Strm.lastType() == DTSC::PAUSEMARK){
conn.close();
//last page output
}
if (Strm.lastType() == DTSC::INVALID){
#if DEBUG >= 3
fprintf(stderr, "Invalid packet received - closing connection.\n");
#endif
conn.close();
}
}
}else{