driver/record.cpp: fix webtv record for live urls via lua plugins

This commit is contained in:
[CST] Focus
2016-03-04 13:04:17 +03:00
parent 54d26aed1c
commit 8e65e72c72

View File

@@ -1894,7 +1894,6 @@ void CStreamRec::GetPids(CZapitChannel * channel)
void CStreamRec::FillMovieInfo(CZapitChannel * channel, APIDList & apid_list) void CStreamRec::FillMovieInfo(CZapitChannel * channel, APIDList & apid_list)
{ {
CRecordInstance::FillMovieInfo(channel, apid_list);
recMovieInfo->VideoType = 0; recMovieInfo->VideoType = 0;
for (unsigned i = 0; i < ofcx->nb_streams; i++) { for (unsigned i = 0; i < ofcx->nb_streams; i++) {
@@ -2014,13 +2013,14 @@ record_error_msg_t CStreamRec::Record()
return ret; return ret;
} }
CRecordInstance::FillMovieInfo(channel, apid_list);
if (!Open(channel) || !Start()) { if (!Open(channel) || !Start()) {
Close(); Close();
hintBox.hide(); hintBox.hide();
return RECORD_FAILURE; return RECORD_FAILURE;
} }
FillMovieInfo(channel, apid_list); FillMovieInfo(channel, apid_list);
SaveXml(); SaveXml();
if(recording_id == 0) { if(recording_id == 0) {
time_t now = time(NULL); time_t now = time(NULL);
@@ -2062,6 +2062,12 @@ bool CStreamRec::Open(CZapitChannel * channel)
if (url.empty()) if (url.empty())
return false; return false;
std::string pretty_name;
if (!CMoviePlayerGui::getInstance(true).getLiveUrl(channel->getChannelID(), channel->getUrl(), channel->getScriptName(), url, pretty_name, recMovieInfo->epgInfo1, recMovieInfo->epgInfo2)) {
printf("%s: getLiveUrl() [%s] failed!\n", __FUNCTION__, url.c_str());
return false;
}
//av_log_set_level(AV_LOG_VERBOSE); //av_log_set_level(AV_LOG_VERBOSE);
av_register_all(); av_register_all();
avcodec_register_all(); avcodec_register_all();