FreeBSD Bugzilla – Attachment 176663 Details for
Bug 214247
multimedia/py-ffmpeg: fails to build with ffmpeg 3.x
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
fix, v1
py-ffmpeg.ffmpeg30.diff (text/plain), 5.55 KB, created by
Jan Beich
on 2016-11-05 18:27:03 UTC
(
hide
)
Description:
fix, v1
Filename:
MIME Type:
Creator:
Jan Beich
Created:
2016-11-05 18:27:03 UTC
Size:
5.55 KB
patch
obsolete
>From ba5a020b6e496d8b0afeb3025d314a9d04a58516 Mon Sep 17 00:00:00 2001 >From: Jan Beich <jbeich@FreeBSD.org> >Date: Sat, 5 Nov 2016 17:45:12 +0000 >Subject: 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) >--- > multimedia/py-ffmpeg/Makefile | 2 +- > .../py-ffmpeg/files/patch-ffmpeg___ffmpeg.pxi | 29 ++++++++++ > .../py-ffmpeg/files/patch-ffmpeg___ffmpeg.pyx | 63 ++++++++++++++++++++++ > 3 files changed, 93 insertions(+), 1 deletion(-) > create mode 100644 multimedia/py-ffmpeg/files/patch-ffmpeg___ffmpeg.pxi > create mode 100644 multimedia/py-ffmpeg/files/patch-ffmpeg___ffmpeg.pyx > >diff --git a/multimedia/py-ffmpeg/Makefile b/multimedia/py-ffmpeg/Makefile >index a7fcfc6..a20486e 100644 >--- a/multimedia/py-ffmpeg/Makefile >+++ b/multimedia/py-ffmpeg/Makefile >@@ -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} >diff --git a/multimedia/py-ffmpeg/files/patch-ffmpeg___ffmpeg.pxi b/multimedia/py-ffmpeg/files/patch-ffmpeg___ffmpeg.pxi >new file mode 100644 >index 0000000..197a63c >--- /dev/null >+++ b/multimedia/py-ffmpeg/files/patch-ffmpeg___ffmpeg.pxi >@@ -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: >diff --git a/multimedia/py-ffmpeg/files/patch-ffmpeg___ffmpeg.pyx b/multimedia/py-ffmpeg/files/patch-ffmpeg___ffmpeg.pyx >new file mode 100644 >index 0000000..199d605 >--- /dev/null >+++ b/multimedia/py-ffmpeg/files/patch-ffmpeg___ffmpeg.pyx >@@ -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 = <unsigned char *>av_malloc(vp.ff_data_size * sizeof(unsigned char)) >+- vp.bmp = avcodec_alloc_frame() >++ vp.bmp = av_frame_alloc() >+ avpicture_fill(<AVPicture *>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 = <uint64_t*>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 = <VideoState *>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
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
dbn
:
maintainer-approval+
Actions:
View
|
Diff
Attachments on
bug 214247
: 176663 |
176677