From 4ea25f2347b14959d16a340045e38cf8b0251ad4 Mon Sep 17 00:00:00 2001 From: Oswald Auguste de Bruin Date: Wed, 28 Aug 2013 10:58:49 +0200 Subject: [PATCH] Fixed Ogg --- src/connectors/conn_http_progressive_ogg.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/connectors/conn_http_progressive_ogg.cpp b/src/connectors/conn_http_progressive_ogg.cpp index e4e547fc..c42229eb 100644 --- a/src/connectors/conn_http_progressive_ogg.cpp +++ b/src/connectors/conn_http_progressive_ogg.cpp @@ -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){