Bug 214197 - multimedia/mlt: fails to build with ffmpeg 3.x
Summary: multimedia/mlt: 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: Alberto Villa
URL:
Keywords: needs-patch
Depends on:
Blocks: 207547
  Show dependency treegraph
 
Reported: 2016-11-04 05:27 UTC by Jan Beich
Modified: 2016-12-11 15:25 UTC (History)
2 users (show)

See Also:


Attachments
workaround (2.48 KB, patch)
2016-11-19 00:03 UTC, Jan Beich
no flags Details | Diff

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 05:27:02 UTC
In file included from producer_avformat.c:153:
./vdpau.c:162:11: error: no member named 'type' in 'struct AVFrame'
                        frame->type = FF_BUFFER_TYPE_USER;
                        ~~~~~  ^
./vdpau.c:162:18: error: use of undeclared identifier 'FF_BUFFER_TYPE_USER'
                        frame->type = FF_BUFFER_TYPE_USER;
                                      ^
./vdpau.c:165:16: error: no member named 'reference' in 'struct AVFrame'
                        if ( frame->reference )
                             ~~~~~  ^
./vdpau.c:239:21: error: no member named 'get_buffer' in 'struct AVCodecContext'; did you mean 'get_buffer2'?
        self->video_codec->get_buffer = vdpau_get_buffer;
                           ^~~~~~~~~~
                           get_buffer2
/usr/local/include/libavcodec/avcodec.h:2565:11: note: 'get_buffer2' declared here
    int (*get_buffer2)(struct AVCodecContext *s, AVFrame *frame, int flags);
          ^
./vdpau.c:240:21: error: no member named 'release_buffer' in 'struct AVCodecContext'
        self->video_codec->release_buffer = vdpau_release_buffer;
        ~~~~~~~~~~~~~~~~~  ^

http://package23.nyi.freebsd.org/data/103i386-default-PR207547/2016-10-04_18h24m30s/logs/errors/mlt-6.2.0_2.log
Comment 1 Matthew Rezny freebsd_committer 2016-11-04 20:50:24 UTC
The build failure is only with the VDPAU option enabled. It appears upstream is likely to remedy the situation by removing VDPAU support (see https://sourceforge.net/p/mlt/bugs/240/), so we might as well just remove or mark BROKEN that option to clear the way for the FFmpeg update.
Comment 2 Jan Beich freebsd_committer 2016-11-05 03:53:35 UTC
graphics/osg/files/patch-ffmpeg3 has an example how to switch from get_buffer to get_buffer2.
Comment 3 Jan Beich freebsd_committer 2016-11-19 00:03:20 UTC
Created attachment 177164 [details]
workaround
Comment 4 Walter Schwarzenfeld freebsd_triage 2016-11-19 06:11:13 UTC
I found this
http://stackoverflow.com/questions/14382239/compile-error-when-using-ffmpeg
maybe, it is the solution (in moment I am running a test with poudriere, I report later).
Comment 5 Walter Schwarzenfeld freebsd_triage 2016-11-19 08:49:14 UTC
Mlt compiles fine on 10.3 with poudriere and in the port. Seems it is only an error on 11.0 
(and maybe also on 12.0).
But I cannot test 11.0.
Comment 6 commit-hook freebsd_committer 2016-12-11 15:23:58 UTC
A commit references this bug:

Author: jbeich
Date: Sun Dec 11 15:23:08 UTC 2016
New revision: 428353
URL: https://svnweb.freebsd.org/changeset/ports/428353

Log:
  multimedia/mlt: disable VDPAU to unbreak with ffmpeg 3.x

  In file included from producer_avformat.c:153:
  ./vdpau.c:162:11: error: no member named 'type' in 'struct AVFrame'
                          frame->type = FF_BUFFER_TYPE_USER;
                          ~~~~~  ^
  ./vdpau.c:162:18: error: use of undeclared identifier 'FF_BUFFER_TYPE_USER'
                          frame->type = FF_BUFFER_TYPE_USER;
                                        ^
  ./vdpau.c:165:16: error: no member named 'reference' in 'struct AVFrame'
                          if ( frame->reference )
                               ~~~~~  ^
  ./vdpau.c:239:21: error: no member named 'get_buffer' in 'struct AVCodecContext'; did you mean 'get_buffer2'?
          self->video_codec->get_buffer = vdpau_get_buffer;
                             ^~~~~~~~~~
                             get_buffer2
  /usr/local/include/libavcodec/avcodec.h:2565:11: note: 'get_buffer2' declared here
      int (*get_buffer2)(struct AVCodecContext *s, AVFrame *frame, int flags);
            ^
  ./vdpau.c:240:21: error: no member named 'release_buffer' in 'struct AVCodecContext'
          self->video_codec->release_buffer = vdpau_release_buffer;
          ~~~~~~~~~~~~~~~~~  ^

  PR:		214197
  Reported by:	antoine (via exp-run)
  Suggested by:	matthew@reztek.cz
  Approved by:	portmgr blanket

Changes:
  head/multimedia/mlt/Makefile