首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >错误: avcodec_init();

错误: avcodec_init();
EN

Stack Overflow用户
提问于 2015-04-26 12:14:06
回答 1查看 2.1K关注 0票数 1

我将尝试在Ubuntu14.04.2下编译,并得到以下错误:

代码语言:javascript
复制
VideoPlayerPipHd.c: In static member function ‘static void reel::VideoPlayerPipHd::Create()’:
VideoPlayerPipHd.c:792:6: error: ‘avcodec_init’ was not declared in this scope
      avcodec_init -> avcodec_register_all;
      ^
VideoPlayerPipHd.c:793:7: error: ‘av_open_input_file’ was not declared in this scope
   av_open_input_file -> avformat_open_input;
   ^

守则是:

代码语言:javascript
复制
787     void VideoPlayerPipHd::Create()
788     {
789         if (!instance_)
790         {
791             instance_ = new VideoPlayerPipHd;
792             avcodec_init();
793             avcodec_register_all();
794         }
795     }

我试过几件事,但我被困住了。有人能帮帮我吗?提前感谢

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-05-10 11:34:30

答案是,ffmpeg函数被废弃了。参见这里的列表,例如:https://www.ffmpeg.org/doxygen/0.8/deprecated.html

例如,将av_open_input_file更改为avformat_open_input

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/29877478

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档