1

我将尝试在 Ubuntu 14.04.2 下编译,我收到以下错误:

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;
   ^

代码是:

787     void VideoPlayerPipHd::Create()
788     {
789         if (!instance_)
790         {
791             instance_ = new VideoPlayerPipHd;
792             avcodec_init();
793             avcodec_register_all();
794         }
795     }

我尝试了几件事,但我被卡住了。有人可以帮我吗?提前致谢

4

1 回答 1

1

答案是 ffmpeg 函数已被弃用。例如,请参阅此处的列表: https ://www.ffmpeg.org/doxygen/0.8/deprecated.html

例如更改av_open_input_fileavformat_open_input.

于 2015-05-10T11:34:30.423 回答