From fce83c903b97a604a93951196f0f9ef22cf8de87 Mon Sep 17 00:00:00 2001 From: Thulinma <jaron@vietors.com> Date: Tue, 21 Jul 2015 23:07:41 +0200 Subject: [PATCH] Make internal HTTP output correctly serve embed codes for newer stream types. --- src/output/output_http_internal.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/output/output_http_internal.cpp b/src/output/output_http_internal.cpp index 936dd016..9e4f05b3 100644 --- a/src/output/output_http_internal.cpp +++ b/src/output/output_http_internal.cpp @@ -232,7 +232,7 @@ namespace Mist { H.Clean(); H.SetHeader("Content-Type", "application/smil"); - H.SetHeader("Server", "mistserver/" PACKAGE_VERSION "/" + Util::Config::libver); + H.SetHeader("Server", "MistServer/" PACKAGE_VERSION); H.setCORSHeaders(); H.SetBody("<smil>\n <head>\n <meta base='rtmp://" + host + ":" + port + url_rel + "' />\n </head>\n <body>\n <switch>\n"+trackSources+" </switch>\n </body>\n</smil>"); H.SendResponse("200", "OK", myConn); @@ -247,7 +247,7 @@ namespace Mist { host.resize(host.find(':')); } H.Clean(); - H.SetHeader("Server", "mistserver/" PACKAGE_VERSION); + H.SetHeader("Server", "MistServer/" PACKAGE_VERSION); H.setCORSHeaders(); if (rURL.substr(0, 6) != "/json_"){ H.SetHeader("Content-Type", "application/javascript"); @@ -267,7 +267,9 @@ namespace Mist { configLock.post(); //Stream metadata not found - attempt to start it if (Util::startInput(streamName)){ - streamIndex.init(streamName, DEFAULT_META_PAGE_SIZE); + char pageId[NAME_BUFFER_SIZE]; + snprintf(pageId, NAME_BUFFER_SIZE, SHM_STREAM_INDEX, streamName.c_str()); + streamIndex.init(pageId, DEFAULT_META_PAGE_SIZE); if (streamIndex.mapped){ metaLock = true; metaLocker.wait();