From owner-svn-ports-all@freebsd.org Sun Nov 6 08:14:05 2016 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 48D14C32B7B; Sun, 6 Nov 2016 08:14:05 +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 mx1.freebsd.org (Postfix) with ESMTPS id 0D10F2D2; Sun, 6 Nov 2016 08:14:04 +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 uA68E401044063; Sun, 6 Nov 2016 08:14:04 GMT (envelope-from jbeich@FreeBSD.org) Received: (from jbeich@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uA68E4Cl044060; Sun, 6 Nov 2016 08:14:04 GMT (envelope-from jbeich@FreeBSD.org) Message-Id: <201611060814.uA68E4Cl044060@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jbeich set sender to jbeich@FreeBSD.org using -f From: Jan Beich Date: Sun, 6 Nov 2016 08:14:04 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r425471 - in head/multimedia/py-ffmpeg: . files X-SVN-Group: ports-head 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.23 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: Sun, 06 Nov 2016 08:14:05 -0000 Author: jbeich Date: Sun Nov 6 08:14:03 2016 New Revision: 425471 URL: https://svnweb.freebsd.org/changeset/ports/425471 Log: multimedia/py-ffmpeg: unbreak build with ffmpeg 3.x ffmpeg/_ffmpeg.c:8559:23: error: no member named 'get_buffer' in 'struct AVCodecContext'; did you mean 'get_buffer2'? __pyx_v_codecCtx->get_buffer = __pyx_f_6ffmpeg_7_ffmpeg_our_get_buffer; ^~~~~~~~~~ get_buffer2 /usr/local/include/libavcodec/avcodec.h:2565:11: note: 'get_buffer2' declared here int (*get_buffer2)(struct AVCodecContext *s, AVFrame *frame, int flags); ^ ffmpeg/_ffmpeg.c:8568:23: error: no member named 'release_buffer' in 'struct AVCodecContext' __pyx_v_codecCtx->release_buffer = __pyx_f_6ffmpeg_7_ffmpeg_our_release_buffer; ~~~~~~~~~~~~~~~~ ^ PR: 214247 Approved by: dbn (maintainer) Added: head/multimedia/py-ffmpeg/files/patch-ffmpeg___ffmpeg.pxi (contents, props changed) head/multimedia/py-ffmpeg/files/patch-ffmpeg___ffmpeg.pyx (contents, props changed) Modified: head/multimedia/py-ffmpeg/Makefile (contents, props changed) Modified: head/multimedia/py-ffmpeg/Makefile ============================================================================== --- head/multimedia/py-ffmpeg/Makefile Sun Nov 6 08:13:47 2016 (r425470) +++ head/multimedia/py-ffmpeg/Makefile Sun Nov 6 08:14:03 2016 (r425471) @@ -3,7 +3,7 @@ PORTNAME= ffmpeg PORTVERSION= 1.2.4 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= multimedia python MASTER_SITES= GH LOCAL/dbn/${PORTNAME} PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} Added: head/multimedia/py-ffmpeg/files/patch-ffmpeg___ffmpeg.pxi ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/multimedia/py-ffmpeg/files/patch-ffmpeg___ffmpeg.pxi Sun Nov 6 08:14:03 2016 (r425471) @@ -0,0 +1,29 @@ +--- ffmpeg/_ffmpeg.pxi.orig 2013-10-28 16:04:02 UTC ++++ ffmpeg/_ffmpeg.pxi +@@ -53,8 +53,6 @@ cdef extern from "libavcodec/avcodec.h" + int channels + AVCodec *codec + AVMediaType codec_type +- int (*get_buffer)(AVCodecContext *c, AVFrame *pic) +- void (*release_buffer)(AVCodecContext *c, AVFrame *pic) + AVRational time_base + AVSampleFormat sample_fmt + struct AVPicture: +@@ -83,7 +81,7 @@ cdef extern from "libavcodec/avcodec.h" + ctypedef int (*lockmgr_t)(void **mutex, AVLockOp op) + int av_lockmgr_register(lockmgr_t cb) + +- AVFrame *avcodec_alloc_frame() ++ AVFrame *av_frame_alloc() + int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture, + int *got_picture_ptr, AVPacket *avpkt) + int avcodec_decode_audio4(AVCodecContext *avctx, AVFrame *frame, int +@@ -100,7 +98,7 @@ cdef extern from "libavcodec/avcodec.h" + int avcodec_default_get_buffer(AVCodecContext *s, AVFrame *pic) + void avcodec_default_release_buffer(AVCodecContext *s, AVFrame *pic) + +- void avcodec_get_frame_defaults(AVFrame *) ++ void av_frame_unref(AVFrame *) + + cdef extern from "libavresample/avresample.h" nogil: + struct ResampleContext: Added: head/multimedia/py-ffmpeg/files/patch-ffmpeg___ffmpeg.pyx ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/multimedia/py-ffmpeg/files/patch-ffmpeg___ffmpeg.pyx Sun Nov 6 08:14:03 2016 (r425471) @@ -0,0 +1,63 @@ +--- ffmpeg/_ffmpeg.pyx.orig 2013-10-28 16:04:02 UTC ++++ ffmpeg/_ffmpeg.pyx +@@ -518,11 +518,11 @@ cdef int audio_decode_frame(VideoState * + got_frame = 0 + + if frame == NULL: +- frame = avcodec_alloc_frame() ++ frame = av_frame_alloc() + if frame == NULL: + return -1 + else: +- avcodec_get_frame_defaults(frame) ++ av_frame_unref(frame) + + len1 = avcodec_decode_audio4(vs.audio_st.codec, + frame, &got_frame, pkt) +@@ -784,7 +784,7 @@ cdef void alloc_picture(void *userdata) + + vp.ff_data_size = avpicture_get_size(PF_RGB24, vp.width, vp.height) + vp.ff_data = av_malloc(vp.ff_data_size * sizeof(unsigned char)) +- vp.bmp = avcodec_alloc_frame() ++ vp.bmp = av_frame_alloc() + avpicture_fill(vp.bmp, vp.ff_data, PF_RGB24, + vp.width, vp.height) + +@@ -886,19 +886,6 @@ cdef double synchronize_video(VideoState + return pts + + +-cdef int our_get_buffer(AVCodecContext *c, AVFrame *pic) nogil: +- cdef int ret = avcodec_default_get_buffer(c, pic) +- cdef uint64_t *pts = av_malloc(sizeof(uint64_t)) +- memcpy(pts, &global_video_pkt_pts, sizeof(uint64_t)) +- pic.opaque = pts +- return ret +- +- +-cdef void our_release_buffer(AVCodecContext *c, AVFrame *pic) nogil: +- if pic != NULL: av_freep(&pic.opaque) +- avcodec_default_release_buffer(c, pic) +- +- + cdef int video_thread(void *arg) nogil: + cdef VideoState *vs = arg + cdef AVPacket pkt1, *packet = &pkt1 +@@ -906,7 +893,7 @@ cdef int video_thread(void *arg) nogil: + cdef AVFrame *pFrame + cdef double pts, ptst = 0 + +- pFrame = avcodec_alloc_frame() ++ pFrame = av_frame_alloc() + + while True: + if packet_queue_get(&vs.videoq, packet, 1) < 0: +@@ -1038,8 +1025,6 @@ cdef int stream_component_open(VideoStat + + packet_queue_init(&vs.videoq) + vs.video_tid = SDL_CreateThread(video_thread, vs) +- codecCtx.get_buffer = our_get_buffer +- codecCtx.release_buffer = our_release_buffer + + else: + pass