From e4f5ba219fae71e5bcbf2843a10ed193612e6694 Mon Sep 17 00:00:00 2001 From: Thulinma Date: Fri, 4 Apr 2014 22:08:07 +0200 Subject: [PATCH] Better handling of .dtsh headers in controller --- src/controller/controller_streams.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/controller/controller_streams.cpp b/src/controller/controller_streams.cpp index ccceb5ea..b9284858 100644 --- a/src/controller/controller_streams.cpp +++ b/src/controller/controller_streams.cpp @@ -120,9 +120,12 @@ namespace Controller { getMeta = true; } if (getMeta){ + // if the file isn't dtsc and there's no dtsh file, run getStream on it + // this guarantees that if the stream is playable, it now has a valid header. if ((URL.substr(URL.size() - 5) != ".dtsc") && (stat((URL+".dtsh").c_str(), &fileinfo) != 0)){ - Util::Stream::getStream(name); + Util::Stream::getVod(URL, name); } + //now, run mistinfo on the source - which will read the file or the header, depending on what is the right thing to do. char * tmp_cmd[3] = {0, 0, 0}; std::string mistinfo = Util::getMyPath() + "MistInfo"; tmp_cmd[0] = (char*)mistinfo.c_str();