0
点赞
收藏
分享

微信扫一扫

编译错误:AVFormatContext没有名为‘url’的成员

软件共享软件 2022-02-07 阅读 108


  • 错误如下:
avformat.c: 在函数‘mod_avformat_alloc_output_context2’中:
avformat.c:385:4: 错误:‘AVFormatContext’没有名为‘url’的成员
s->url = strdup(filename);
  • 具体出错的代码
#if (LIBAVCODEC_VERSION_INT < AV_VERSION_INT(58,7,100))
av_strlcpy(s->filename, filename, sizeof(s->filename));
#else
s->url = strdup(filename);
switch_assert(s->url);
#endif

就是这个版本号判断错了。这个版本的定义:

  • 解决办法

吾把代码的判断改了,顺利编译通过。


举报

相关推荐

0 条评论