diff options
author | jbeich <jbeich@FreeBSD.org> | 2016-04-16 00:46:24 +0800 |
---|---|---|
committer | jbeich <jbeich@FreeBSD.org> | 2016-04-16 00:46:24 +0800 |
commit | 109a810c303456590256fa8690bd8da02e9c9b9c (patch) | |
tree | 6f77edba13f1acf152ee8a0be2c5494eece174d6 /multimedia | |
parent | 80cb6155ba65c091a325642208b3429a70aa8f36 (diff) | |
download | freebsd-ports-gnome-109a810c303456590256fa8690bd8da02e9c9b9c.tar.gz freebsd-ports-gnome-109a810c303456590256fa8690bd8da02e9c9b9c.tar.zst freebsd-ports-gnome-109a810c303456590256fa8690bd8da02e9c9b9c.zip |
multimedia/libxine: unbreak build with ffmpeg 3.0
ff_audio_decoder.c:593:22: error: implicit declaration of function 'avcodec_alloc_frame' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
this->av_frame = avcodec_alloc_frame ();
^
ff_audio_decoder.c:1074:5: error: implicit declaration of function 'avcodec_free_frame' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
avcodec_free_frame (&this->av_frame);
^
PR: 208817
Reported by: antoine (via exp-run)
Submitted by: Ben Woods <woodsb02@gmail.com>
Obtained from: Arch Linux
MFH: 2016Q2 (just-in-case "fix it" blanket)
Diffstat (limited to 'multimedia')
-rw-r--r-- | multimedia/libxine/Makefile | 2 | ||||
-rw-r--r-- | multimedia/libxine/files/patch-ffmpeg3 | 57 |
2 files changed, 58 insertions, 1 deletions
diff --git a/multimedia/libxine/Makefile b/multimedia/libxine/Makefile index 7c4cc8a16344..4b3971cb25df 100644 --- a/multimedia/libxine/Makefile +++ b/multimedia/libxine/Makefile @@ -3,7 +3,7 @@ PORTNAME= xine PORTVERSION= 1.2.6 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= multimedia ipv6 MASTER_SITES= SF/${PORTNAME}/${PORTNAME}-lib/${PORTVERSION} PKGNAMEPREFIX= lib diff --git a/multimedia/libxine/files/patch-ffmpeg3 b/multimedia/libxine/files/patch-ffmpeg3 new file mode 100644 index 000000000000..5f939bac43c4 --- /dev/null +++ b/multimedia/libxine/files/patch-ffmpeg3 @@ -0,0 +1,57 @@ +Index: src/combined/ffmpeg/ff_audio_decoder.c +=================================================================== +--- xine-lib-1.2.6.orig/src/combined/ffmpeg/ff_audio_decoder.c ++++ src/combined/ffmpeg/ff_audio_decoder.c +@@ -590,7 +590,7 @@ static int ff_audio_decode (ff_audio_dec + int got_frame; + float gain = this->class->gain; + if (!this->av_frame) +- this->av_frame = avcodec_alloc_frame (); ++ this->av_frame = av_frame_alloc (); + + consumed = avcodec_decode_audio4 (this->context, this->av_frame, &got_frame, &avpkt); + if ((consumed >= 0) && got_frame) { +@@ -1071,7 +1071,7 @@ static void ff_audio_reset (audio_decode + /* try to reset the wma decoder */ + if( this->decoder_ok ) { + #if AVAUDIO > 3 +- avcodec_free_frame (&this->av_frame); ++ av_frame_free (&this->av_frame); + #endif + pthread_mutex_lock (&ffmpeg_lock); + avcodec_close (this->context); +@@ -1105,7 +1105,7 @@ static void ff_audio_dispose (audio_deco + + if( this->context && this->decoder_ok ) { + #if AVAUDIO > 3 +- avcodec_free_frame (&this->av_frame); ++ av_frame_free (&this->av_frame); + #endif + pthread_mutex_lock (&ffmpeg_lock); + avcodec_close (this->context); +Index: src/combined/ffmpeg/ff_video_decoder.c +=================================================================== +--- xine-lib-1.2.6.orig/src/combined/ffmpeg/ff_video_decoder.c ++++ src/combined/ffmpeg/ff_video_decoder.c +@@ -2523,7 +2523,7 @@ static video_decoder_t *ff_video_open_pl + this->stream = stream; + this->class = (ff_video_class_t *) class_gen; + +- this->av_frame = avcodec_alloc_frame(); ++ this->av_frame = av_frame_alloc(); + this->context = avcodec_alloc_context(); + this->context->opaque = this; + #if AVPALETTE == 1 +Index: src/dxr3/ffmpeg_encoder.c +=================================================================== +--- src/dxr3/ffmpeg_encoder.c.orig 2016-02-17 07:54:31.950881580 +0000 ++++ src/dxr3/ffmpeg_encoder.c 2016-02-17 07:55:42.897237494 +0000 +@@ -161,7 +161,7 @@ + "dxr3_mpeg_encoder: Couldn't start the ffmpeg library\n"); + return 0; + } +- this->picture = avcodec_alloc_frame(); ++ this->picture = av_frame_alloc(); + if (!this->picture) { + xprintf(drv->class->xine, XINE_VERBOSITY_LOG, + "dxr3_mpeg_encoder: Couldn't allocate ffmpeg frame\n"); |