fix multistream, fix record streams

Origin commit data
------------------
Branch: ni/coolstream
Commit: 05a0e4d04a
Author: TangoCash <eric@loxat.de>
Date: 2022-09-12 (Mon, 12 Sep 2022)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
TangoCash
2022-09-12 21:01:59 +02:00
committed by vanhofen
parent 85ee3ec49a
commit d76d10d148
7 changed files with 172 additions and 35 deletions

View File

@@ -2301,6 +2301,12 @@ bool CStreamRec::Open(CZapitChannel * channel)
if (!headers.empty())//add cookies
av_dict_set(&options, "headers", headers.c_str(), 0);
if (0 == strncmp(url.c_str(), "http://", 7) || 0 == strncmp(url.c_str(), "https://", 8))
{
av_dict_set(&options, "timeout", "20000000", 0); //20sec
av_dict_set(&options, "reconnect", "1", 0);
}
if (avformat_open_input(&ifcx, url.c_str(), NULL, &options) != 0) {
printf("%s: Cannot open input [%s]!\n", __FUNCTION__, url.c_str());
if (!headers.empty())