diff --git a/src/driver/record.cpp b/src/driver/record.cpp index 97052a6fa..442c533a7 100644 --- a/src/driver/record.cpp +++ b/src/driver/record.cpp @@ -2194,7 +2194,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