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; ~~~~~~~~~~~~~~~~ ^ http://package23.nyi.freebsd.org/data/103i386-default-PR207547/2016-10-04_18h24m30s/logs/errors/py27-ffmpeg-1.2.4_2.log
Created attachment 176663 [details] fix, v1 FreeBSD 10.1 i386 + ffmpeg 2.8 build log: http://sprunge.us/USMX from libavcodec/avcodec.h: /** * The default callback for AVCodecContext.get_buffer2(). It is made public so * it can be called by custom get_buffer2() implementations for decoders without * AV_CODEC_CAP_DR1 set. */ int avcodec_default_get_buffer2(AVCodecContext *s, AVFrame *frame, int flags);
I'm currently AFK, please commit this change. Otherwise I can attend to it after 21 November. Also, if you avoid renaming avcodec_alloc_frame to av_alloc_frame, the diff will be smaller.
Rename cannot be avoided, the old API is gone. >>> import ffmpeg Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python2.7/site-packages/ffmpeg/__init__.py", line 12, in <module> from _ffmpeg import FFVideo, FFVideoException ImportError: /usr/local/lib/python2.7/site-packages/ffmpeg/_ffmpeg.so: Undefined symbol "avcodec_alloc_frame" doc/APIchanges says: 2013-12-11 - 29c83d2 / b9fb59d,409a143 / 9431356,44967ab / d7b3ee9 - lavc 55.45.101 / 55.28.1 - avco\ dec.h av_frame_alloc(), av_frame_unref() and av_frame_free() now can and should be used instead of avcodec_alloc_frame(), avcodec_get_frame_defaults() and avcodec_free_frame() respectively. The latter three functions are deprecated. https://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=8f12ef9860d0
A commit references this bug: Author: jbeich Date: Sun Nov 6 08:14:04 UTC 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) Changes: head/multimedia/py-ffmpeg/Makefile head/multimedia/py-ffmpeg/files/patch-ffmpeg___ffmpeg.pxi head/multimedia/py-ffmpeg/files/patch-ffmpeg___ffmpeg.pyx
Created attachment 176677 [details] followup fix One more change maybe required. However, ffmpeg/__init__.py (uses py-kivy) works "fine" without. It's hard to measure A/V sync when video rendering is too slow to catch up to audio. This occured even before the fixes here.
A commit references this bug: Author: jbeich Date: Mon Nov 7 10:48:18 UTC 2016 New revision: 425603 URL: https://svnweb.freebsd.org/changeset/ports/425603 Log: multimedia/py-ffmpeg: adjust pts after r425471 AVFrame.pkt_pts didn't exist in ffmpeg-4f7d2fe-2010-12-16 snapshot when global_video_pkt_pts was added to py-ffmpeg. The code worked it around by saving PTS in AVFrame.opaque just before avcodec_decode_video2() call. This broke when r425471 removed our_get_buffer(). So, just use AVFrame.pkt_pts directly now. PR: 214247 Approved by: dbn (maintainer) Changes: head/multimedia/py-ffmpeg/Makefile head/multimedia/py-ffmpeg/files/patch-ffmpeg___ffmpeg.pxi head/multimedia/py-ffmpeg/files/patch-ffmpeg___ffmpeg.pyx
Note, FFmpeg 3.2 / libav v12 have https://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=32c8359093d1