From b5181422369ef3e5773c7e15ab3004006322d065 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 4 Sep 2014 23:07:56 +0200 Subject: build: handle insane libavcodec API bullshit The oldest supported FFmpeg release doesn't provide av_vdpau_alloc_context(). With these versions, the application has no other choice than to hard code the size of AVVDPAUContext. (On the other hand, there's av_alloc_vdpaucontext(), which does the same thing, but is FFmpeg specific - not sure if it was available early enough, so I'm not touching it.) Newer FFmpeg and Libav releases require you to call this function, for ABI compatibility reasons. It's the typcal lakc of foresight that make FFmpeg APIs terrible. mpv successfully pretended that this crap didn't exist (ABI compat. is near impossible to reach anyway) - but it appears newer developments in Libav change the function from initializing the struct with all-zeros to something else, and mpv vdpau decoding would stop working as soon as this new work is relewased. So, add a configure test (sigh). CC: @mpv-player/stable --- old-configure | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'old-configure') diff --git a/old-configure b/old-configure index 5c549c395e..3661afa8f8 100755 --- a/old-configure +++ b/old-configure @@ -832,6 +832,12 @@ api_statement_check \ libavutil/frame.h \ 'av_frame_get_qp_table(NULL, NULL, NULL)' +api_statement_check \ + "libavcodec av_vdpau_alloc_context()" \ + HAVE_AVCODEC_VDPAU_ALLOC_CONTEXT \ + libavcodec/vdpau.h \ + 'AVVDPAUContext *x = av_vdpau_alloc_context()' + check_pkg_config "libavfilter" $_libavfilter LIBAVFILTER 'libavfilter >= 3.90.100' check_pkg_config "libavdevice" $_libavdevice LIBAVDEVICE 'libavdevice >= 54.0.0' -- cgit v1.2.3