1

I'll try to compile under Ubuntu 14.04.2 and I get the following error:

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

The code is:

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

I tried several things but I am stuck. Could somebody help me please? Thanks in advance

musbach
  • 558
  • 1
  • 9
  • 29
  • What are your `#include`s for that file? – Gábor Bakos Apr 26 '15 at 12:17
  • $ grep "#include" VideoPlayerPipHd.c #include "VideoPlayerPipHd.h" #include "HdCommChannel.h" #include "Reel.h" // for Byte #include // reading png file #include #include #include #include #include #include #include #include #include #include #include #include #include – musbach Apr 26 '15 at 13:00

1 Answers1

1

The answer is that the ffmpeg functions are deprecated. See the list here for example: https://www.ffmpeg.org/doxygen/0.8/deprecated.html

For example change av_open_input_file to avformat_open_input.

musbach
  • 558
  • 1
  • 9
  • 29