record: fix stream rec segfault, supplement to last commit

Origin commit data
------------------
Branch: ni/coolstream
Commit: 46623881ea
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2019-05-17 (Fri, 17 May 2019)


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

------------------
This commit was generated by Migit
This commit is contained in:
Jacek Jendrzej
2019-05-17 22:29:19 +02:00
committed by vanhofen
parent b43edf770e
commit 7cc071997d

View File

@@ -2301,7 +2301,7 @@ bool CStreamRec::Open(CZapitChannel * channel)
snprintf(ifcx->filename, sizeof(ifcx->filename), "%s", channel->getUrl().c_str());
av_dump_format(ifcx, 0, ifcx->filename, 0);
#else
snprintf(ifcx->url, channel->getUrl().size() + 1, "%s", channel->getUrl().c_str());
ifcx->url = av_strdup(!channel->getUrl().empty() ? channel->getUrl().c_str() : "");
av_dump_format(ifcx, 0, ifcx->url, 0);
#endif