diff options
author | wm4 <wm4@nowhere> | 2014-09-04 23:07:56 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-09-05 01:52:29 +0200 |
commit | b5181422369ef3e5773c7e15ab3004006322d065 (patch) | |
tree | 4f0a9baeab991d823d8dad14e6c52ff4e16de133 /old-configure | |
parent | e267ff93f32783e324c93395ab135e5b26f0efe1 (diff) |
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
Diffstat (limited to 'old-configure')
-rwxr-xr-x | old-configure | 6 |
1 files changed, 6 insertions, 0 deletions
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' |