record: fix stream rec segfault

Origin commit data
------------------
Branch: ni/coolstream
Commit: 315e63c707
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 3343d11207
commit b43edf770e

View File

@@ -2324,7 +2324,7 @@ bool CStreamRec::Open(CZapitChannel * channel)
#if (LIBAVFORMAT_VERSION_MAJOR < 58)
snprintf(ofcx->filename, sizeof(ofcx->filename), "%s", tsfile.c_str());
#else
snprintf(ofcx->url, tsfile.size() + 1, "%s", tsfile.c_str());
ofcx->url = av_strdup(!tsfile.empty() ? tsfile.c_str() : "");
#endif
stream_index = -1;