Fixed Ogg
This commit is contained in:
parent
a24b7c674e
commit
4ea25f2347
1 changed files with 9 additions and 2 deletions
|
@ -104,10 +104,10 @@ namespace Connector_HTTP {
|
|||
Strm.waitForMeta(ss);
|
||||
int byterate = 0;
|
||||
for (JSON::ObjIter objIt = Strm.metadata["tracks"].ObjBegin(); objIt != Strm.metadata["tracks"].ObjEnd(); objIt++){
|
||||
if (videoID == -1 && objIt->second["codec"].asString() == "THEORA"){
|
||||
if (videoID == -1 && objIt->second["codec"].asString() == "theora"){
|
||||
videoID = objIt->second["trackid"].asInt();
|
||||
}
|
||||
if (audioID == -1 && objIt->second["codec"].asString() == "VORBIS"){
|
||||
if (audioID == -1 && objIt->second["codec"].asString() == "vorbis"){
|
||||
audioID = objIt->second["trackid"].asInt();
|
||||
}
|
||||
}
|
||||
|
@ -121,6 +121,13 @@ namespace Connector_HTTP {
|
|||
if (seek_byte){
|
||||
seek_sec = (seek_byte / byterate) * 1000;
|
||||
}
|
||||
if (videoID == -1 && audioID == -1){
|
||||
HTTP_S.Clean(); //make sure no parts of old requests are left in any buffers
|
||||
HTTP_S.SetBody("This stream contains no OGG compatible codecs");
|
||||
HTTP_S.SendResponse("406", "Not acceptable",conn);
|
||||
HTTP_R.Clean();
|
||||
continue;
|
||||
}
|
||||
std::stringstream cmd;
|
||||
cmd << "t";
|
||||
if (videoID != -1){
|
||||
|
|
Loading…
Add table
Reference in a new issue