MantisBT - Open CASCADE
View Issue Details
0030965Open CASCADE[OCCT] OCCT:Configurationpublic2019-09-14 14:422020-09-11 17:08
abv 
bugmaster 
normalminor 
assignedopen 
[OCCT] 7.4.0 
[OCCT] 7.6.0* 
0030965: Configuration - compilation error when building with FFmpeg 2.8
When building OCCT (7.4.0.beta2) with Clang 6.0 on Ubuntu 16.04, I get these errors:

[ 32%] Building CXX object src/TKService/CMakeFiles/TKService.dir/__/Media/Media_CodecContext.cxx.o
/home/abv/occt/src/Media/Media_CodecContext.cxx:93:60: error: no member named 'codecpar' in 'AVStream'
  if (avcodec_parameters_to_context (myCodecCtx, theStream.codecpar) < 0)
                                                 ~~~~~~~~~ ^
/home/abv/occt/src/Media/Media_CodecContext.cxx:104:98: error: no member named 'codecpar' in 'AVStream'
  const AVCodecID aCodecId = theCodecId != AV_CODEC_ID_NONE ? (AVCodecID )theCodecId : theStream.codecpar->code...
                                                                                       ~~~~~~~~~ ^
/home/abv/occt/src/Media/Media_CodecContext.cxx:116:17: error: no member named 'codecpar' in 'AVStream'
  if (theStream.codecpar->codec_type == AVMEDIA_TYPE_VIDEO)
      ~~~~~~~~~ ^
/home/abv/occt/src/Media/Media_CodecContext.cxx:146:17: error: no member named 'codecpar' in 'AVStream'
  if (theStream.codecpar->codec_type == AVMEDIA_TYPE_VIDEO
      ~~~~~~~~~ ^
/home/abv/occt/src/Media/Media_CodecContext.cxx:241:20: error: use of undeclared identifier
      'avcodec_send_packet'
  const int aRes = avcodec_send_packet (myCodecCtx, thePacket->Packet());
                   ^
/home/abv/occt/src/Media/Media_CodecContext.cxx:264:21: error: use of undeclared identifier
      'avcodec_receive_frame'
  const int aRes2 = avcodec_receive_frame (myCodecCtx, theFrame->ChangeFrame());
                    ^
6 errors generated.

I have FFmpeg 2.8.15-0ubuntu0.16.04.1
No tags attached.
Issue History
2019-09-14 14:42abvNew Issue
2019-09-14 14:42abvAssigned To => kgv
2019-09-16 14:42kgvNote Added: 0087136
2019-09-16 14:42kgvAssigned Tokgv => abv
2019-09-16 14:42kgvStatusnew => feedback
2019-09-18 08:26abvNote Added: 0087241
2019-09-18 08:26abvAssigned Toabv => apn
2019-09-18 08:26abvStatusfeedback => assigned
2019-09-18 08:26abvCategoryOCCT:Visualization => OCCT:Configuration
2019-09-18 08:26abvSummaryVisualization - compilation error when building with FFmpeg 2.8 => Configuration - compilation error when building with FFmpeg 2.8
2020-09-11 15:37utverdovAssigned Toapn => inv
2020-09-11 15:40utverdovTarget Version7.5.0 => 7.6.0*
2020-09-11 16:01kgvProduct Version => 7.4.0
2020-09-11 17:08bugmasterAssigned Toinv => bugmaster

Notes
(0087136)
kgv   
2019-09-16 14:42   
OCCT requires FFmpeg 3.1 or later, which is specified in requirements:
https://dev.opencascade.org/doc/overview/html/index.html#OCCT_OVW_SECTION_5 [^]
(0087241)
abv   
2019-09-18 08:26   
I see; then I suppose CMake scripts should report error if older version is found