summaryrefslogtreecommitdiffstats
path: root/wscript
diff options
context:
space:
mode:
authorJan Ekström <jeebjp@gmail.com>2021-10-25 00:36:52 +0300
committerJan Ekström <jeebjp@gmail.com>2021-10-26 01:21:56 +0300
commit78cfeee2b93830f2988508a653b508336147b79d (patch)
tree53cba15ed1e6e874a7c8fb9fb39e27fd1b4187dd /wscript
parentf56043759494dd584c8d82e7890f92fada18e34b (diff)
downloadmpv-78cfeee2b93830f2988508a653b508336147b79d.tar.bz2
mpv-78cfeee2b93830f2988508a653b508336147b79d.tar.xz
{wscript,demux_lavf}: clean up last bits of !FFMPEG_STRICT_ABI
The bytes_read struct member in AVIOContext is now officially public, so its usage no longer has to be specified as non-compliance with FFmpeg's ABI/API rules. That said, unfortunately there was a short period of time between August 2021 and October 2021 where the struct member did not exist in FFmpeg's git master, so keep a feature check for it alive for now to enable building with those versions. Thankfully, no release version of FFmpeg will be without this field, so it should be possible to drop this check with time. Finally, simplify the function in case the struct member is not found. After all, there is zero reason to iterate through the AVIO contexts if we cannot get the information we require.
Diffstat (limited to 'wscript')
-rw-r--r--wscript12
1 files changed, 8 insertions, 4 deletions
diff --git a/wscript b/wscript
index 4012fa1f7d..b44adc2ad4 100644
--- a/wscript
+++ b/wscript
@@ -412,10 +412,14 @@ FFmpeg libraries. Git master is recommended."
'desc': 'libavdevice',
'func': check_pkg_config('libavdevice', '>= 57.0.0'),
}, {
- 'name': '--ffmpeg-strict-abi',
- 'desc': 'Disable all known FFmpeg ABI violations',
- 'func': check_true,
- 'default': 'enable',
+ # The following should be removed in 2022 or if libavformat requirement
+ # is bumped to >= 59.8.100
+ 'name': 'ffmpeg-aviocontext-bytes-read',
+ 'desc': 'FFmpeg AVIOContext bytes_read statistic field',
+ 'deps': 'ffmpeg',
+ 'func': check_statement(['libavformat/avio.h'],
+ '(struct AVIOContext){ 0 }.bytes_read = 7357',
+ use=['ffmpeg']),
}
]