aboutsummaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authorjbeich <jbeich@FreeBSD.org>2016-12-12 16:52:33 +0800
committerjbeich <jbeich@FreeBSD.org>2016-12-12 16:52:33 +0800
commitd3d485de87973db22f51e08ea38311c1bf1e7877 (patch)
tree1244fc204b288d8df0d96421325b9943b100fc3e /graphics
parent41f4133dbd700255e7fb8c1fd40a9fce2ffb2872 (diff)
downloadfreebsd-ports-gnome-d3d485de87973db22f51e08ea38311c1bf1e7877.tar.gz
freebsd-ports-gnome-d3d485de87973db22f51e08ea38311c1bf1e7877.tar.zst
freebsd-ports-gnome-d3d485de87973db22f51e08ea38311c1bf1e7877.zip
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
Diffstat (limited to 'graphics')
-rw-r--r--graphics/php5-ffmpeg/Makefile2
-rw-r--r--graphics/php5-ffmpeg/files/patch-ffmpeg_frame.c24
-rw-r--r--graphics/php5-ffmpeg/files/patch-ffmpeg_movie.c18
3 files changed, 41 insertions, 3 deletions
diff --git a/graphics/php5-ffmpeg/Makefile b/graphics/php5-ffmpeg/Makefile
index e0c1785c4e53..854cb80492fb 100644
--- a/graphics/php5-ffmpeg/Makefile
+++ b/graphics/php5-ffmpeg/Makefile
@@ -4,7 +4,7 @@
PORTNAME= ffmpeg
PORTVERSION= 0.6.0.20120114
DISTVERSIONPREFIX= php-
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= graphics
MASTER_SITES= LOCAL/sunpoet
PKGNAMEPREFIX= php5-
diff --git a/graphics/php5-ffmpeg/files/patch-ffmpeg_frame.c b/graphics/php5-ffmpeg/files/patch-ffmpeg_frame.c
index 0b669a13a2de..311d1df016c4 100644
--- a/graphics/php5-ffmpeg/files/patch-ffmpeg_frame.c
+++ b/graphics/php5-ffmpeg/files/patch-ffmpeg_frame.c
@@ -1,5 +1,23 @@
--- ffmpeg_frame.c.orig 2014-07-23 17:57:32 UTC
+++ ffmpeg_frame.c
+@@ -211,7 +211,7 @@ int _php_convert_frame(ff_frame_context
+ return 0; // NOP
+ }
+
+- dst_frame = avcodec_alloc_frame();
++ dst_frame = av_frame_alloc();
+ avpicture_alloc((AVPicture*)dst_frame, dst_fmt, ff_frame->width,
+ ff_frame->height);
+
+@@ -400,7 +400,7 @@ FFMPEG_PHP_METHOD(ffmpeg_frame, ffmpeg_f
+ height = gdImageSY(gd_img);
+
+ /* create a an av_frame and allocate space for it */
+- frame = avcodec_alloc_frame();
++ frame = av_frame_alloc();
+ avpicture_alloc((AVPicture*)frame, FFMPEG_PHP_FFMPEG_RGB_PIX_FORMAT, width, height);
+
+ /* copy the gd image to the av_frame */
@@ -499,7 +499,7 @@ int _php_resample_frame(ff_frame_context
}
@@ -9,11 +27,13 @@
img_resample_ctx = img_resample_full_init(
wanted_width, wanted_height,
-@@ -511,7 +511,7 @@ int _php_resample_frame(ff_frame_context
+@@ -510,8 +510,8 @@ int _php_resample_frame(ff_frame_context
+ return -1;
}
- resampled_frame = avcodec_alloc_frame();
+- resampled_frame = avcodec_alloc_frame();
- avpicture_alloc((AVPicture*)resampled_frame, PIX_FMT_YUV420P,
++ resampled_frame = av_frame_alloc();
+ avpicture_alloc((AVPicture*)resampled_frame, AV_PIX_FMT_YUV420P,
wanted_width, wanted_height);
diff --git a/graphics/php5-ffmpeg/files/patch-ffmpeg_movie.c b/graphics/php5-ffmpeg/files/patch-ffmpeg_movie.c
index 48a4aba8528e..f0136461618e 100644
--- a/graphics/php5-ffmpeg/files/patch-ffmpeg_movie.c
+++ b/graphics/php5-ffmpeg/files/patch-ffmpeg_movie.c
@@ -53,3 +53,21 @@
/* fake mpeg2 transport stream codec (currently not registered) */
codec_name = "mpeg2ts";
} else if (decoder_ctx->codec_name[0] != '\0') {
+@@ -1223,7 +1225,7 @@ static AVFrame* _php_read_av_frame(ff_mo
+ return NULL;
+ }
+
+- frame = avcodec_alloc_frame();
++ frame = av_frame_alloc();
+
+ /* read next frame */
+ while (av_read_frame(ffmovie_ctx->fmt_ctx, &packet) >= 0) {
+@@ -1353,7 +1355,7 @@ static int _php_get_ff_frame(ff_movie_co
+ ff_frame->keyframe = is_keyframe;
+ ff_frame->pts = pts;
+
+- ff_frame->av_frame = avcodec_alloc_frame();
++ ff_frame->av_frame = av_frame_alloc();
+ avpicture_alloc((AVPicture*)ff_frame->av_frame, ff_frame->pixel_format,
+ ff_frame->width, ff_frame->height);
+