Bug 214815

Summary: multimedia/tvheadend: fails to build with ffmpeg 3.x (TRANSCODING=on)
Product: Ports & Packages Reporter: Jan Beich <jbeich>
Component: Individual Port(s)Assignee: Jan Beich <jbeich>
Status: Closed FIXED    
Severity: Affects Only Me CC: decke
Priority: --- Keywords: patch, patch-ready
Version: LatestFlags: bugzilla: maintainer-feedback? (decke)
Hardware: Any   
OS: Any   
URL: https://github.com/tvheadend/tvheadend/commit/c63371c8bf51928a6c965bdf17dd73555b7b9d54
Bug Depends on:    
Bug Blocks: 207547    
Attachments:
Description Flags
v1 (upstream fix rebased) jbeich: maintainer-approval? (decke)

Description Jan Beich freebsd_committer freebsd_triage 2016-11-25 08:14:44 UTC
src/plumbing/transcoding.c:27:10: fatal error: 'libavutil/audioconvert.h' file not found
#include <libavutil/audioconvert.h>
         ^
src/plumbing/transcoding.c:1064:30: error: use of undeclared identifier 'PIX_FMT_YUV420P'; did you
      mean 'AV_PIX_FMT_YUV420P'?
      octx->pix_fmt        = PIX_FMT_YUV420P;
                             ^~~~~~~~~~~~~~~
                             AV_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)
    ^
src/plumbing/transcoding.c:1092:30: error: use of undeclared identifier 'PIX_FMT_YUV420P'; did you
      mean 'AV_PIX_FMT_YUV420P'?
      octx->pix_fmt        = PIX_FMT_YUV420P;
                             ^~~~~~~~~~~~~~~
                             AV_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)
    ^
src/plumbing/transcoding.c:1123:30: error: use of undeclared identifier 'PIX_FMT_YUV420P'; did you
      mean 'AV_PIX_FMT_YUV420P'?
      octx->pix_fmt        = PIX_FMT_YUV420P;
                             ^~~~~~~~~~~~~~~
                             AV_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)
    ^

build.freebsd/src/plumbing/transcoding.o: In function `transcoder_input':
src/plumbing/transcoding.c:(.text+0x559): undefined reference to `avcodec_alloc_frame'
src/plumbing/transcoding.c:(.text+0x56a): undefined reference to `avcodec_alloc_frame'
src/plumbing/transcoding.c:(.text+0x57f): undefined reference to `avcodec_get_frame_defaults'
src/plumbing/transcoding.c:(.text+0x58a): undefined reference to `avcodec_get_frame_defaults'
build.freebsd/src/plumbing/transcoding.o: In function `transcoder_stream_video':
src/plumbing/transcoding.c:(.text+0x1904): undefined reference to `avpicture_deinterlace'
cc: error: linker command failed with exit code 1 (use -v to see invocation)

http://package23.nyi.freebsd.org/data/103i386-default-PR207547/2016-11-25_07h03m58s/logs/errors/tvheadend-4.0.8_1.log
Comment 1 Jan Beich freebsd_committer freebsd_triage 2016-11-25 09:39:54 UTC
Created attachment 177374 [details]
v1 (upstream fix rebased)

10.3 amd64 + ffmpeg 2.8 build log: http://sprunge.us/cIGd
Comment 2 Bernhard Froehlich freebsd_committer freebsd_triage 2016-12-02 21:37:38 UTC
Looks good to me. Approved.
Comment 3 commit-hook freebsd_committer freebsd_triage 2016-12-04 02:02:44 UTC
A commit references this bug:

Author: jbeich
Date: Sun Dec  4 02:02:26 UTC 2016
New revision: 427753
URL: https://svnweb.freebsd.org/changeset/ports/427753

Log:
  multimedia/tvheadend: unbreak with ffmpeg 3.x

  src/plumbing/transcoding.c:27:10: fatal error: 'libavutil/audioconvert.h' file not found
   #include <libavutil/audioconvert.h>
            ^
  src/plumbing/transcoding.c:1064:30: error: use of undeclared identifier 'PIX_FMT_YUV420P'; did you
        mean 'AV_PIX_FMT_YUV420P'?
        octx->pix_fmt        = PIX_FMT_YUV420P;
                               ^~~~~~~~~~~~~~~
                               AV_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)
      ^
  src/plumbing/transcoding.c:1092:30: error: use of undeclared identifier 'PIX_FMT_YUV420P'; did you
        mean 'AV_PIX_FMT_YUV420P'?
        octx->pix_fmt        = PIX_FMT_YUV420P;
                               ^~~~~~~~~~~~~~~
                               AV_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)
      ^
  src/plumbing/transcoding.c:1123:30: error: use of undeclared identifier 'PIX_FMT_YUV420P'; did you
        mean 'AV_PIX_FMT_YUV420P'?
        octx->pix_fmt        = PIX_FMT_YUV420P;
                               ^~~~~~~~~~~~~~~
                               AV_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)
      ^

  build.freebsd/src/plumbing/transcoding.o: In function `transcoder_input':
  src/plumbing/transcoding.c:(.text+0x559): undefined reference to `avcodec_alloc_frame'
  src/plumbing/transcoding.c:(.text+0x56a): undefined reference to `avcodec_alloc_frame'
  src/plumbing/transcoding.c:(.text+0x57f): undefined reference to `avcodec_get_frame_defaults'
  src/plumbing/transcoding.c:(.text+0x58a): undefined reference to `avcodec_get_frame_defaults'
  build.freebsd/src/plumbing/transcoding.o: In function `transcoder_stream_video':
  src/plumbing/transcoding.c:(.text+0x1904): undefined reference to `avpicture_deinterlace'
  cc: error: linker command failed with exit code 1 (use -v to see invocation)

  PR:		214815
  Reported by:	antoine (via exp-run)
  Obtained from:	upstream
  Approved by:	decke (maintainer)

Changes:
  head/multimedia/tvheadend/Makefile
  head/multimedia/tvheadend/files/patch-ffmpeg30