mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-28 16:01:10 +02:00
add headers ffmpeg option for luascript bg play; use in script 'entry['header'] = 'Cookie: var=name';
Origin commit data
------------------
Commit: a61b8de691
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2016-03-25 (Fri, 25 Mar 2016)
This commit is contained in:
@@ -770,8 +770,8 @@ bool CStreamStream::Open()
|
||||
if (url.empty())
|
||||
return false;
|
||||
|
||||
std::string pretty_name, livestreamInfo1, livestreamInfo2;
|
||||
if (!CMoviePlayerGui::getInstance(true).getLiveUrl(channel->getChannelID(), channel->getUrl(), channel->getScriptName(), url, pretty_name, livestreamInfo1, livestreamInfo2)) {
|
||||
std::string pretty_name, livestreamInfo1, livestreamInfo2, headers;
|
||||
if (!CMoviePlayerGui::getInstance(true).getLiveUrl(channel->getChannelID(), channel->getUrl(), channel->getScriptName(), url, pretty_name, livestreamInfo1, livestreamInfo2,headers)) {
|
||||
printf("%s: getLiveUrl() [%s] failed!\n", __FUNCTION__, url.c_str());
|
||||
return false;
|
||||
}
|
||||
@@ -784,6 +784,8 @@ bool CStreamStream::Open()
|
||||
printf("%s: Open input [%s]....\n", __FUNCTION__, url.c_str());
|
||||
|
||||
AVDictionary *options = NULL;
|
||||
if (!headers.empty())
|
||||
av_dict_set(&options, "headers", headers.c_str(), 0);
|
||||
if (avformat_open_input(&ifcx, url.c_str(), NULL, &options) != 0) {
|
||||
printf("%s: Cannot open input [%s]!\n", __FUNCTION__, channel->getUrl().c_str());
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user