svn commit: r426346 - head/graphics/php5-ffmpeg/files
Jan Beich
jbeich at FreeBSD.org
Fri Nov 18 22:01:17 UTC 2016
Author: jbeich
Date: Fri Nov 18 22:01:15 2016
New Revision: 426346
URL: https://svnweb.freebsd.org/changeset/ports/426346
Log:
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
Added:
head/graphics/php5-ffmpeg/files/patch-ffmpeg__frame.c (contents, props changed)
head/graphics/php5-ffmpeg/files/patch-ffmpeg__movie.c (contents, props changed)
- copied, changed from r426345, head/graphics/php5-ffmpeg/files/patch-ffmpeg_movie.c
head/graphics/php5-ffmpeg/files/patch-ffmpeg__tools.c (contents, props changed)
Deleted:
head/graphics/php5-ffmpeg/files/patch-ffmpeg_movie.c
Added: head/graphics/php5-ffmpeg/files/patch-ffmpeg__frame.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/graphics/php5-ffmpeg/files/patch-ffmpeg__frame.c Fri Nov 18 22:01:15 2016 (r426346)
@@ -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,
Copied and modified: head/graphics/php5-ffmpeg/files/patch-ffmpeg__movie.c (from r426345, head/graphics/php5-ffmpeg/files/patch-ffmpeg_movie.c)
==============================================================================
--- head/graphics/php5-ffmpeg/files/patch-ffmpeg_movie.c Fri Nov 18 22:00:57 2016 (r426345, copy source)
+++ head/graphics/php5-ffmpeg/files/patch-ffmpeg__movie.c Fri Nov 18 22:01:15 2016 (r426346)
@@ -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') {
Added: head/graphics/php5-ffmpeg/files/patch-ffmpeg__tools.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/graphics/php5-ffmpeg/files/patch-ffmpeg__tools.c Fri Nov 18 22:01:15 2016 (r426346)
@@ -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);
More information about the svn-ports-head
mailing list