setup url instead of filename in the AVFormatContext to satisfy filename being deprecated
parent
c97eb16942
commit
d0cca01c4c
|
@ -338,7 +338,11 @@ AVFormatContext *SessionDescriptor::generateFormatContext() const
|
|||
{
|
||||
AVFormatContext *formatContext = avformat_alloc_context();
|
||||
|
||||
strncpy( formatContext->filename, mUrl.c_str(), sizeof(formatContext->filename) );
|
||||
#if (LIBAVFORMAT_VERSION_CHECK(58, 12, 0, 0, 100))
|
||||
formatContext->url = av_strdup(mUrl.c_str());
|
||||
#else
|
||||
strncpy(formatContext->filename, mUrl.c_str(), sizeof(formatContext->filename));
|
||||
#endif
|
||||
/*
|
||||
if ( mName.length() )
|
||||
strncpy( formatContext->title, mName.c_str(), sizeof(formatContext->title) );
|
||||
|
|
Loading…
Reference in New Issue