From owner-svn-ports-all@freebsd.org Fri May 4 11:40:45 2018 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A4EB8FAA1AC; Fri, 4 May 2018 11:40:45 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 57577843A9; Fri, 4 May 2018 11:40:45 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 388E26613; Fri, 4 May 2018 11:40:45 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w44BejZ9056389; Fri, 4 May 2018 11:40:45 GMT (envelope-from jbeich@FreeBSD.org) Received: (from jbeich@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w44BejnR056387; Fri, 4 May 2018 11:40:45 GMT (envelope-from jbeich@FreeBSD.org) Message-Id: <201805041140.w44BejnR056387@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jbeich set sender to jbeich@FreeBSD.org using -f From: Jan Beich Date: Fri, 4 May 2018 11:40:45 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r469018 - in head/graphics/php5-ffmpeg: . files X-SVN-Group: ports-head X-SVN-Commit-Author: jbeich X-SVN-Commit-Paths: in head/graphics/php5-ffmpeg: . files X-SVN-Commit-Revision: 469018 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 May 2018 11:40:46 -0000 Author: jbeich Date: Fri May 4 11:40:44 2018 New Revision: 469018 URL: https://svnweb.freebsd.org/changeset/ports/469018 Log: graphics/php5-ffmpeg: unbreak with ffmpeg 4.0 ffmpeg_movie.c:978:29: error: no member named 'codec_name' in 'struct AVCodecContext'; did you mean 'coded_frame'? } else if (decoder_ctx->codec_name[0] != '\0') { ^~~~~~~~~~ coded_frame /usr/local/include/libavcodec/avcodec.h:2760:35: note: 'coded_frame' declared here attribute_deprecated AVFrame *coded_frame; ^ ffmpeg_movie.c:978:43: error: invalid operands to binary expression ('AVFrame' (aka 'struct AVFrame') and 'int') } else if (decoder_ctx->codec_name[0] != '\0') { ~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~ ffmpeg_movie.c:979:35: error: no member named 'codec_name' in 'struct AVCodecContext' codec_name = decoder_ctx->codec_name; ~~~~~~~~~~~ ^ PR: 227726 Reported by: antoine (via exp-run) Modified: head/graphics/php5-ffmpeg/Makefile (contents, props changed) head/graphics/php5-ffmpeg/files/patch-ffmpeg_movie.c (contents, props changed) Modified: head/graphics/php5-ffmpeg/Makefile ============================================================================== --- head/graphics/php5-ffmpeg/Makefile Fri May 4 11:40:30 2018 (r469017) +++ head/graphics/php5-ffmpeg/Makefile Fri May 4 11:40:44 2018 (r469018) @@ -15,8 +15,6 @@ COMMENT= FFmpeg shared extension for php LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/LICENSE -BROKEN= fails to build with ffmpeg 4.0 - LIB_DEPENDS= libgd.so:graphics/gd \ libavutil.so:multimedia/ffmpeg Modified: head/graphics/php5-ffmpeg/files/patch-ffmpeg_movie.c ============================================================================== --- head/graphics/php5-ffmpeg/files/patch-ffmpeg_movie.c Fri May 4 11:40:30 2018 (r469017) +++ head/graphics/php5-ffmpeg/files/patch-ffmpeg_movie.c Fri May 4 11:40:44 2018 (r469018) @@ -1,6 +1,6 @@ --- ffmpeg_movie.c.orig 2014-07-23 17:57:31 UTC +++ ffmpeg_movie.c -@@ -315,7 +315,7 @@ FFMPEG_PHP_CONSTRUCTOR(ffmpeg_movie, __c +@@ -315,7 +315,7 @@ FFMPEG_PHP_CONSTRUCTOR(ffmpeg_movie, __construct) } if (persistent) { @@ -9,7 +9,7 @@ /* resolve the fully-qualified path name to use as the hash key */ fullpath = expand_filepath(filename, NULL TSRMLS_CC); -@@ -350,7 +350,7 @@ FFMPEG_PHP_CONSTRUCTOR(ffmpeg_movie, __c +@@ -350,7 +350,7 @@ FFMPEG_PHP_CONSTRUCTOR(ffmpeg_movie, __construct) } } else { /* no existing persistant movie, create one */ @@ -18,7 +18,7 @@ ffmovie_ctx = _php_alloc_ffmovie_ctx(1); if (_php_open_movie_file(ffmovie_ctx, filename)) { -@@ -364,7 +364,7 @@ FFMPEG_PHP_CONSTRUCTOR(ffmpeg_movie, __c +@@ -364,7 +364,7 @@ FFMPEG_PHP_CONSTRUCTOR(ffmpeg_movie, __construct) new_le.ptr = ffmovie_ctx; if (FAILURE == zend_hash_update(&EG(persistent_list), hashkey, @@ -27,7 +27,7 @@ NULL)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed to register persistent resource"); -@@ -508,7 +508,7 @@ static AVCodecContext* _php_get_decoder_ +@@ -508,7 +508,7 @@ static AVCodecContext* _php_get_decoder_context(ff_mov codec_id)); if (!decoder) { @@ -36,7 +36,7 @@ _php_get_filename(ffmovie_ctx)); return NULL; } -@@ -964,13 +964,15 @@ static const char* _php_get_codec_name(f +@@ -964,17 +964,19 @@ static const char* _php_get_codec_name(ff_movie_contex /* Copied from libavcodec/utils.c::avcodec_string */ if (p) { codec_name = p->name; @@ -52,8 +52,14 @@ + } 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') { -@@ -1223,7 +1225,7 @@ static AVFrame* _php_read_av_frame(ff_mo +- } else if (decoder_ctx->codec_name[0] != '\0') { +- codec_name = decoder_ctx->codec_name; ++ } else if (avcodec_get_name(decoder_ctx->codec_id)[0] != '\0') { ++ codec_name = avcodec_get_name(decoder_ctx->codec_id); + } else { + /* output avi tags */ + if (decoder_ctx->codec_type == AVMEDIA_TYPE_VIDEO) { +@@ -1223,7 +1225,7 @@ static AVFrame* _php_read_av_frame(ff_movie_context *f return NULL; } @@ -62,7 +68,7 @@ /* 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 +@@ -1353,7 +1355,7 @@ static int _php_get_ff_frame(ff_movie_context *ffmovie ff_frame->keyframe = is_keyframe; ff_frame->pts = pts;