aboutsummaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authorjbeich <jbeich@FreeBSD.org>2016-11-19 06:01:15 +0800
committerjbeich <jbeich@FreeBSD.org>2016-11-19 06:01:15 +0800
commit84810e1b3729f84e5667d93f3ee043cd28035f01 (patch)
tree661d943e85b50cdf186b2024346197a2a20c7953 /graphics
parentd8bce02c458e2eb2ee694ba811607b11ce801e0b (diff)
downloadfreebsd-ports-gnome-84810e1b3729f84e5667d93f3ee043cd28035f01.tar.gz
freebsd-ports-gnome-84810e1b3729f84e5667d93f3ee043cd28035f01.tar.zst
freebsd-ports-gnome-84810e1b3729f84e5667d93f3ee043cd28035f01.zip
graphics/php5-ffmpeg: unbreak build with ffmpeg 3.x
ffmpeg_movie.c:975:41: error: use of undeclared identifier 'CODEC_ID_MPEG2TS'; did you mean 'AV_CODEC_ID_MPEG2TS'? } else if (decoder_ctx->codec_id == CODEC_ID_MPEG2TS) { ^~~~~~~~~~~~~~~~ AV_CODEC_ID_MPEG2TS /usr/local/include/libavcodec/avcodec.h:647:5: note: 'AV_CODEC_ID_MPEG2TS' declared here AV_CODEC_ID_MPEG2TS = 0x20000, /**< _FAKE_ codec to indicate a raw MPEG-2 TS ^ ffmpeg_frame.c:502:34: error: use of undeclared identifier 'PIX_FMT_YUV420P'; did you mean 'AV_PIX_FMT_YUV420P'? _php_convert_frame(ff_frame, PIX_FMT_YUV420P); ^~~~~~~~~~~~~~~ ffmpeg_frame.c:514:50: error: use of undeclared identifier 'PIX_FMT_YUV420P'; did you mean 'AV_PIX_FMT_YUV420P'? avpicture_alloc((AVPicture*)resampled_frame, 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) ^ PR: 214191 Approved by: portmgr blanket
Diffstat (limited to 'graphics')
-rw-r--r--graphics/php5-ffmpeg/files/patch-ffmpeg__frame.c20
-rw-r--r--graphics/php5-ffmpeg/files/patch-ffmpeg__movie.c (renamed from graphics/php5-ffmpeg/files/patch-ffmpeg_movie.c)6
-rw-r--r--graphics/php5-ffmpeg/files/patch-ffmpeg__tools.c13
3 files changed, 37 insertions, 2 deletions
diff --git a/graphics/php5-ffmpeg/files/patch-ffmpeg__frame.c b/graphics/php5-ffmpeg/files/patch-ffmpeg__frame.c
new file mode 100644
index 000000000000..0b669a13a2de
--- /dev/null
+++ b/graphics/php5-ffmpeg/files/patch-ffmpeg__frame.c
@@ -0,0 +1,20 @@
+--- ffmpeg_frame.c.orig 2014-07-23 17:57:32 UTC
++++ ffmpeg_frame.c
+@@ -499,7 +499,7 @@ int _php_resample_frame(ff_frame_context
+ }
+
+ /* convert to PIX_FMT_YUV420P required for resampling */
+- _php_convert_frame(ff_frame, PIX_FMT_YUV420P);
++ _php_convert_frame(ff_frame, AV_PIX_FMT_YUV420P);
+
+ img_resample_ctx = img_resample_full_init(
+ wanted_width, wanted_height,
+@@ -511,7 +511,7 @@ int _php_resample_frame(ff_frame_context
+ }
+
+ resampled_frame = avcodec_alloc_frame();
+- avpicture_alloc((AVPicture*)resampled_frame, PIX_FMT_YUV420P,
++ avpicture_alloc((AVPicture*)resampled_frame, AV_PIX_FMT_YUV420P,
+ wanted_width, wanted_height);
+
+ img_resample(img_resample_ctx, (AVPicture*)resampled_frame,
diff --git a/graphics/php5-ffmpeg/files/patch-ffmpeg_movie.c b/graphics/php5-ffmpeg/files/patch-ffmpeg__movie.c
index d8b4779f37ba..48a4aba8528e 100644
--- a/graphics/php5-ffmpeg/files/patch-ffmpeg_movie.c
+++ b/graphics/php5-ffmpeg/files/patch-ffmpeg__movie.c
@@ -36,7 +36,7 @@
_php_get_filename(ffmovie_ctx));
return NULL;
}
-@@ -964,12 +964,14 @@ static const char* _php_get_codec_name(f
+@@ -964,13 +964,15 @@ static const char* _php_get_codec_name(f
/* Copied from libavcodec/utils.c::avcodec_string */
if (p) {
codec_name = p->name;
@@ -47,7 +47,9 @@
else if (decoder_ctx->sub_id == 1)
codec_name = "mp1";
}
+- } else if (decoder_ctx->codec_id == CODEC_ID_MPEG2TS) {
+ */
- } else if (decoder_ctx->codec_id == CODEC_ID_MPEG2TS) {
++ } else if (decoder_ctx->codec_id == AV_CODEC_ID_MPEG2TS) {
/* fake mpeg2 transport stream codec (currently not registered) */
codec_name = "mpeg2ts";
+ } else if (decoder_ctx->codec_name[0] != '\0') {
diff --git a/graphics/php5-ffmpeg/files/patch-ffmpeg__tools.c b/graphics/php5-ffmpeg/files/patch-ffmpeg__tools.c
new file mode 100644
index 000000000000..07b9b1e185d0
--- /dev/null
+++ b/graphics/php5-ffmpeg/files/patch-ffmpeg__tools.c
@@ -0,0 +1,13 @@
+--- ffmpeg_tools.c.orig 2014-07-23 17:57:32 UTC
++++ ffmpeg_tools.c
+@@ -98,8 +98,8 @@ ImgReSampleContext * img_resample_full_i
+ int srcSurface = (iwidth - rightBand - leftBand)* (iheight - topBand - bottomBand);
+ // We use bilinear when the source surface is big, and bicubic when the number of pixels to handle is less than 1 MPixels
+ s->context = sws_getContext(iwidth - rightBand - leftBand,
+- iheight - topBand - bottomBand, PIX_FMT_YUV420P, owidth, oheight,
+- PIX_FMT_YUV420P, srcSurface > 1024000 ? SWS_FAST_BILINEAR : SWS_BICUBIC,
++ iheight - topBand - bottomBand, AV_PIX_FMT_YUV420P, owidth, oheight,
++ AV_PIX_FMT_YUV420P, srcSurface > 1024000 ? SWS_FAST_BILINEAR : SWS_BICUBIC,
+ NULL, NULL, NULL);
+ if (s->context == NULL) {
+ av_free(s);