您当前的位置: 首页 > 

柳鲲鹏

暂无认证

  • 0浏览

    0关注

    4642博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

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

柳鲲鹏 发布时间:2020-06-25 18:40:29 ,浏览量:0

  • 错误如下:
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

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

https://blog.csdn.net/quantum7/article/details/106961024

  • 解决办法

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

关注
打赏
1665724893
查看更多评论
立即登录/注册

微信扫码登录

0.0480s