Bug 214234 - multimedia/vlc: fails to build with ffmpeg 3.x
Summary: multimedia/vlc: 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: Thomas Zander
URL:
Keywords: patch, patch-ready
Depends on:
Blocks: 207547
  Show dependency treegraph
 
Reported: 2016-11-05 05:28 UTC by Jan Beich
Modified: 2016-11-13 14:56 UTC (History)
2 users (show)

See Also:
riggs: maintainer-feedback+
riggs: merge-quarterly-


Attachments
fix, v1 (7.12 KB, patch)
2016-11-05 06:49 UTC, Jan Beich
riggs: maintainer-approval+
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-05 05:28:44 UTC
configure: error: libavutil versions 55 and later are not supported.
configure: error: VDPAU requires FFmpeg libavcodec < 57.10 or libav.

codec/avcodec/video.c:237:23: error: implicit declaration of function 'avcodec_alloc_frame' is
      invalid in C99 [-Werror,-Wimplicit-function-declaration]
    p_sys->p_ff_pic = avcodec_alloc_frame();
                      ^
codec/avcodec/video.c:237:23: note: did you mean 'avcodec_send_frame'?
/usr/local/include/libavcodec/avcodec.h:4949:5: note: 'avcodec_send_frame' declared here
int avcodec_send_frame(AVCodecContext *avctx, const AVFrame *frame);
    ^
codec/avcodec/video.c:237:21: warning: incompatible integer to pointer conversion assigning to
      'AVFrame *' (aka 'struct AVFrame *') from 'int' [-Wint-conversion]
    p_sys->p_ff_pic = avcodec_alloc_frame();
                    ^ ~~~~~~~~~~~~~~~~~~~~~
codec/avcodec/video.c:319:34: warning: incompatible pointer types assigning to 'enum AVPixelFormat
      (*)(struct AVCodecContext *, const enum AVPixelFormat *)' from 'enum PixelFormat
      (AVCodecContext *, const enum PixelFormat *)' (aka 'enum PixelFormat (struct AVCodecContext *,
      const enum PixelFormat *)') [-Wincompatible-pointer-types]
    p_sys->p_context->get_format = ffmpeg_GetFormat;
                                 ^ ~~~~~~~~~~~~~~~~
codec/avcodec/video.c:449:9: error: implicit declaration of function 'avcodec_free_frame' is invalid
      in C99 [-Werror,-Wimplicit-function-declaration]
        avcodec_free_frame( &p_sys->p_ff_pic );
        ^
codec/avcodec/video.c:449:9: note: did you mean 'avcodec_send_frame'?
/usr/local/include/libavcodec/avcodec.h:4949:5: note: 'avcodec_send_frame' declared here
int avcodec_send_frame(AVCodecContext *avctx, const AVFrame *frame);
    ^
codec/avcodec/video.c:645:18: warning: 'avcodec_decode_video2' is deprecated
      [-Wdeprecated-declarations]
        i_used = avcodec_decode_video2( p_context, p_sys->p_ff_pic,
                 ^
/usr/local/include/libavcodec/avcodec.h:4811:5: note: 'avcodec_decode_video2' has been explicitly
      marked deprecated here
int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture,
    ^
codec/avcodec/video.c:692:38: warning: 'pkt_pts' is deprecated [-Wdeprecated-declarations]
                    p_sys->p_ff_pic->pkt_pts;
                                     ^
/usr/local/include/libavutil/frame.h:276:13: note: 'pkt_pts' has been explicitly marked deprecated
      here
    int64_t pkt_pts;
            ^
codec/avcodec/video.c:1316:25: error: incomplete result type 'enum PixelFormat' in function
      definition
static enum PixelFormat ffmpeg_GetFormat( AVCodecContext *p_context,
                        ^
codec/avcodec/video.c:111:13: note: forward declaration of 'enum PixelFormat'
static enum PixelFormat ffmpeg_GetFormat( AVCodecContext *,
            ^
codec/avcodec/video.c:1328:30: error: subscript of pointer to incomplete type
      'const enum PixelFormat'
    for( size_t i = 0; pi_fmt[i] != AV_PIX_FMT_NONE; i++ )
                       ~~~~~~^
codec/avcodec/video.c:111:13: note: forward declaration of 'enum PixelFormat'
static enum PixelFormat ffmpeg_GetFormat( AVCodecContext *,
            ^
codec/avcodec/video.c:1330:67: error: subscript of pointer to incomplete type
      'const enum PixelFormat'
        const AVPixFmtDescriptor *dsc = av_pix_fmt_desc_get(pi_fmt[i]);
                                                            ~~~~~~^
codec/avcodec/video.c:111:13: note: forward declaration of 'enum PixelFormat'
static enum PixelFormat ffmpeg_GetFormat( AVCodecContext *,
            ^
codec/avcodec/video.c:1336:51: error: subscript of pointer to incomplete type
      'const enum PixelFormat'
                 hwaccel ? "hard" : "soft", pi_fmt[i], dsc->name );
                                            ~~~~~~^
../include/vlc_messages.h:78:63: note: expanded from macro 'msg_Dbg'
    vlc_Log( VLC_OBJECT(p_this), VLC_MSG_DBG,  MODULE_STRING, __VA_ARGS__ )
                                                              ^~~~~~~~~~~
codec/avcodec/video.c:111:13: note: forward declaration of 'enum PixelFormat'
static enum PixelFormat ffmpeg_GetFormat( AVCodecContext *,
            ^
codec/avcodec/video.c:1355:30: error: subscript of pointer to incomplete type
      'const enum PixelFormat'
    for( size_t i = 0; pi_fmt[i] != AV_PIX_FMT_NONE; i++ )
                       ~~~~~~^
codec/avcodec/video.c:111:13: note: forward declaration of 'enum PixelFormat'
static enum PixelFormat ffmpeg_GetFormat( AVCodecContext *,
            ^
codec/avcodec/video.c:1357:36: error: subscript of pointer to incomplete type
      'const enum PixelFormat'
        if( p_va->pix_fmt != pi_fmt[i] )
                             ~~~~~~^
codec/avcodec/video.c:111:13: note: forward declaration of 'enum PixelFormat'
static enum PixelFormat ffmpeg_GetFormat( AVCodecContext *,
            ^
codec/avcodec/video.c:1381:22: error: subscript of pointer to incomplete type
      'const enum PixelFormat'
        return pi_fmt[i];
               ~~~~~~^
codec/avcodec/video.c:111:13: note: forward declaration of 'enum PixelFormat'
static enum PixelFormat ffmpeg_GetFormat( AVCodecContext *,
            ^
codec/avcodec/video.c:1389:51: warning: incompatible pointer types passing 'const enum PixelFormat *'
      to parameter of type 'const enum AVPixelFormat *' [-Wincompatible-pointer-types]
    return avcodec_default_get_format( p_context, pi_fmt );
                                                  ^~~~~~
/usr/local/include/libavcodec/avcodec.h:5572:100: note: passing argument to parameter 'fmt' here
  ...avcodec_default_get_format(struct AVCodecContext *s, const enum AVPixelFormat * fmt);
                                                                                     ^
codec/avcodec/video.c:1389:12: error: returning 'enum AVPixelFormat' from a function with
      incompatible result type 'enum PixelFormat'
    return avcodec_default_get_format( p_context, pi_fmt );
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5 warnings and 10 errors generated.

http://package23.nyi.freebsd.org/data/103i386-default-PR207547/2016-10-04_18h24m30s/logs/errors/vlc-2.2.4_1,4.log
http://package23.nyi.freebsd.org/data/103i386-default-PR207547/2016-10-04_18h24m30s/logs/errors/vlc-qt4-2.2.4_1,4.log
Comment 1 Jan Beich freebsd_committer 2016-11-05 06:49:08 UTC
Created attachment 176652 [details]
fix, v1

Mechanical -> MFH candidate. Does anyone want to check regressions on FFmpeg 3.x ?

FreeBSD 10.1 + FFmpeg 2.8 build logs: 
http://sprunge.us/DYZT
http://sprunge.us/cKTH
Comment 2 Jan Beich freebsd_committer 2016-11-09 08:52:48 UTC
Reminder: if you don't review (or do any QA) I'll land attachment 176652 [details] per maintainer timeout.
Comment 3 Thomas Zander freebsd_committer 2016-11-13 14:17:39 UTC
MFH is not required, since ffmpeg 3.x won't make it to the past quarterly branch
Comment 4 commit-hook freebsd_committer 2016-11-13 14:44:41 UTC
A commit references this bug:

Author: riggs
Date: Sun Nov 13 14:43:42 UTC 2016
New revision: 426055
URL: https://svnweb.freebsd.org/changeset/ports/426055

Log:
  Fix build with ffmpeg 3.x

  PR:		214234
  Submitted by:	jbeich

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