Bug 214191 - graphics/php5-ffmpeg: fails to build with ffmpeg 3.x
Summary: graphics/php5-ffmpeg: fails to build with ffmpeg 3.x
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Jan Beich
URL:
Keywords: needs-patch
Depends on:
Blocks: 207547
  Show dependency treegraph
 
Reported: 2016-11-04 04:59 UTC by Jan Beich
Modified: 2016-12-12 08:53 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (sunpoet)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer 2016-11-04 04:59:33 UTC
/wrkdirs/usr/ports/graphics/php5-ffmpeg/work/ffmpeg-php-0.6.0.20120114/ffmpeg_movie.c:975:41: error: use of undeclared identifier 'CODEC_ID_MPEG2TS'; did you mean 'AV_CODEC_ID_MPEG2TS'?
    } else if (decoder_ctx->codec_id == CODEC_ID_MPEG2TS) {
                                        ^~~~~~~~~~~~~~~~
                                        AV_CODEC_ID_MPEG2TS
/usr/local/include/libavcodec/avcodec.h:644:5: note: 'AV_CODEC_ID_MPEG2TS' declared here
    AV_CODEC_ID_MPEG2TS = 0x20000, /**< _FAKE_ codec to indicate a raw MPEG-2 TS
    ^

http://package23.nyi.freebsd.org/data/103i386-default-PR207547/2016-10-04_18h24m30s/logs/errors/php5-ffmpeg-0.6.0.20120114_2.log
Comment 1 commit-hook freebsd_committer 2016-11-18 22:01:41 UTC
A commit references this bug:

Author: jbeich
Date: Fri Nov 18 22:01:16 UTC 2016
New revision: 426346
URL: https://svnweb.freebsd.org/changeset/ports/426346

Log:
  graphics/php5-ffmpeg: unbreak build with ffmpeg 3.x

  ffmpeg_movie.c:975:41: error:
        use of undeclared identifier 'CODEC_ID_MPEG2TS'; did you mean 'AV_CODEC_ID_MPEG2TS'?
      } else if (decoder_ctx->codec_id == CODEC_ID_MPEG2TS) {
                                          ^~~~~~~~~~~~~~~~
                                          AV_CODEC_ID_MPEG2TS
  /usr/local/include/libavcodec/avcodec.h:647:5: note: 'AV_CODEC_ID_MPEG2TS' declared here
      AV_CODEC_ID_MPEG2TS = 0x20000, /**< _FAKE_ codec to indicate a raw MPEG-2 TS
      ^
  ffmpeg_frame.c:502:34: error:
        use of undeclared identifier 'PIX_FMT_YUV420P'; did you mean 'AV_PIX_FMT_YUV420P'?
      _php_convert_frame(ff_frame, PIX_FMT_YUV420P);
                                   ^~~~~~~~~~~~~~~
  ffmpeg_frame.c:514:50: error:
        use of undeclared identifier 'PIX_FMT_YUV420P'; did you mean 'AV_PIX_FMT_YUV420P'?
      avpicture_alloc((AVPicture*)resampled_frame, PIX_FMT_YUV420P,
                                                   ^~~~~~~~~~~~~~~
  /usr/local/include/libavutil/pixfmt.h:62:5: note: 'AV_PIX_FMT_YUV420P' declared here
      AV_PIX_FMT_YUV420P,   ///< planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
      ^

  PR:		214191
  Approved by:	portmgr blanket

Changes:
  head/graphics/php5-ffmpeg/files/patch-ffmpeg__frame.c
  head/graphics/php5-ffmpeg/files/patch-ffmpeg__movie.c
  head/graphics/php5-ffmpeg/files/patch-ffmpeg__tools.c
  head/graphics/php5-ffmpeg/files/patch-ffmpeg_movie.c
Comment 2 commit-hook freebsd_committer 2016-12-12 08:53:28 UTC
A commit references this bug:

Author: jbeich
Date: Mon Dec 12 08:52:34 UTC 2016
New revision: 428400
URL: https://svnweb.freebsd.org/changeset/ports/428400

Log:
  graphics/php5-ffmpeg: unbreak runtime with ffmpeg 3.x

  $ echo CFLAGS+=-Werror=implicit-function-declaration >>Makefile.local
  $ make
  [...]
  ffmpeg_movie.c:1228:13:error: implicit declaration of function 'avcodec_alloc_frame' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
      frame = avcodec_alloc_frame();
              ^
  PR:		214191
  Pointy hat to:	jbeich
  Approved by:	portmgr blanket

Changes:
  head/graphics/php5-ffmpeg/Makefile
  head/graphics/php5-ffmpeg/files/patch-ffmpeg_frame.c
  head/graphics/php5-ffmpeg/files/patch-ffmpeg_movie.c