From 333c74a2c43c37e3098e5c05d2ecf649091f13c9 Mon Sep 17 00:00:00 2001 From: Erik Zandvliet Date: Fri, 23 Aug 2013 14:24:06 +0200 Subject: [PATCH] Edits in HTTP Smooth Connector, Also fixed a bug in MistPlayer --- src/buffer/player.cpp | 2 +- src/connectors/conn_http_smooth.cpp | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/buffer/player.cpp b/src/buffer/player.cpp index 2508c699..17df9d83 100644 --- a/src/buffer/player.cpp +++ b/src/buffer/player.cpp @@ -243,7 +243,7 @@ int main(int argc, char** argv){ if (playing == -1 && playUntil == 0 && source.getJSON()["time"].asInt() > now - lastTime + 7500){ Util::sleep(source.getJSON()["time"].asInt() - (now - lastTime + 5000)); } - if ( playUntil && playUntil < source.getJSON()["time"].asInt()){ + if ( playUntil && playUntil <= source.getJSON()["time"].asInt()){ playing = 0; } if (playing == 0){ diff --git a/src/connectors/conn_http_smooth.cpp b/src/connectors/conn_http_smooth.cpp index 02e220a0..c5ccd847 100644 --- a/src/connectors/conn_http_smooth.cpp +++ b/src/connectors/conn_http_smooth.cpp @@ -75,7 +75,7 @@ namespace Connector_HTTP { "Name=\"audio\" " "Chunks=\"" << allAudio.ObjBegin()->second["keys"].size() << "\" " "Url=\"Q({bitrate})/A({start time})\">\n"; - int index = 1; + int index = 0; for (JSON::ObjIter oIt = allAudio.ObjBegin(); oIt != allAudio.ObjEnd(); oIt++){ Result << "\n"; - int index = 1; + int index = 0; for (JSON::ObjIter oIt = allVideo.ObjBegin(); oIt != allVideo.ObjEnd(); oIt++){ //Add video qualities Result << "