Skip to content

Commit

Permalink
std::string_view cannot be constructed from nullptr
Browse files Browse the repository at this point in the history
  • Loading branch information
mmomtchev committed Dec 19, 2023
1 parent dde1ce0 commit 7824210
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/formatcontext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ int64_t custom_io_seek(void *opaque, int64_t offset, int whence)
string_view get_uri(const AVFormatContext *ctx)
{
#if API_AVFORMAT_URL
if (ctx->url == nullptr)
return {};
return ctx->url;
#else
return ctx->filename;
Expand Down

0 comments on commit 7824210

Please sign in to comment.