summaryrefslogtreecommitdiffstats
path: root/wscript
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-09-04 23:07:56 +0200
committerAlessandro Ghedini <alessandro@ghedini.me>2014-09-05 12:01:22 +0200
commit4a8e5ea26922f57287c04e3c548c574d7e334f44 (patch)
tree33b267d07235396c6717353ef692daf09fc5fa54 /wscript
parent367665b4c407246cfbe3a08521f90c5aba385f18 (diff)
downloadmpv-4a8e5ea26922f57287c04e3c548c574d7e334f44.tar.bz2
mpv-4a8e5ea26922f57287c04e3c548c574d7e334f44.tar.xz
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 'wscript')
-rw-r--r--wscript6
1 files changed, 6 insertions, 0 deletions
diff --git a/wscript b/wscript
index 7786ebf7d2..54b6cd4322 100644
--- a/wscript
+++ b/wscript
@@ -369,6 +369,12 @@ Libav libraries ({0}). Aborting.".format(" ".join(libav_pkg_config_checks))
'av_frame_get_qp_table(NULL, NULL, NULL)',
use='libav')
}, {
+ 'name': 'avcodec-vdpau-alloc-context',
+ 'desc': 'libavcodec vdpau non-sense',
+ 'func': check_statement('libavcodec/vdpau.h',
+ 'AVVDPAUContext *x = av_vdpau_alloc_context()',
+ use='libav')
+ }, {
'name': '--libavfilter',
'desc': 'libavfilter',
'func': check_pkg_config('libavfilter', '>= 3.90.100'),