mirror of
https://github.com/mpv-player/mpv.git
synced 2024-09-19 19:42:24 +02:00
build: remove aviocontext bytes_read check
This define was always just a stopgap for that two month period (August
2021 - October 2021) where the bytes_read field in ffmpeg was completely
missing. Before that time, it was a private member in a struct (which
mpv used). Afterwards, it officially became public. Fortunately, the
lack of this field never actually made it into a release, so it could
have only possibly affected people building from the master branch.
Since ffmpeg 5.0 came out recently, and it's been plenty of months since
that two month window, we can go ahead and drop this check. This
finishes up the work done in 78cfeee2b9
.
Sidenote: the cached ffmpeg version in the mingw ci were from that time
period when the bytes_read field was missing. The N in the workflow is
bumped to force a full rebuild and fresh clone of ffmpeg.
This commit is contained in:
parent
e809ef0441
commit
8087e3371f
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@ -22,7 +22,7 @@ jobs:
|
||||
- uses: actions/cache@v2
|
||||
with:
|
||||
path: mingw_prefix/
|
||||
key: "${{ matrix.target }}-1"
|
||||
key: "${{ matrix.target }}-2"
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
|
@ -261,9 +261,6 @@ typedef struct lavf_priv {
|
||||
|
||||
static void update_read_stats(struct demuxer *demuxer)
|
||||
{
|
||||
#if !HAVE_FFMPEG_AVIOCONTEXT_BYTES_READ
|
||||
return;
|
||||
#else
|
||||
lavf_priv_t *priv = demuxer->priv;
|
||||
|
||||
for (int n = 0; n < priv->num_nested; n++) {
|
||||
@ -274,7 +271,6 @@ static void update_read_stats(struct demuxer *demuxer)
|
||||
nest->last_bytes = cur;
|
||||
demux_report_unbuffered_read_bytes(demuxer, new);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// At least mp4 has name="mov,mp4,m4a,3gp,3g2,mj2", so we split the name
|
||||
|
@ -598,13 +598,6 @@ if darwin
|
||||
endif
|
||||
|
||||
|
||||
# The following should be removed in 2022 or if libavformat requirement
|
||||
# is bumped to >= 59.8.100
|
||||
aviocontext_bytes_read = cc.has_member('AVIOContext', 'bytes_read',
|
||||
dependencies: ffmpeg['deps'][2], #libavformat
|
||||
prefix: '#include <libavformat/avio.h>')
|
||||
|
||||
|
||||
# misc dependencies
|
||||
cdda_opt = get_option('cdda').require(
|
||||
get_option('gpl'),
|
||||
@ -1739,7 +1732,6 @@ conf_data.set10('HAVE_EGL_ANGLE_WIN32', egl_angle_win32.allowed())
|
||||
conf_data.set10('HAVE_EGL_DRM', egl_drm.allowed())
|
||||
conf_data.set10('HAVE_EGL_HELPERS', egl_helpers)
|
||||
conf_data.set10('HAVE_EGL_X11', egl_x11.allowed())
|
||||
conf_data.set10('HAVE_FFMPEG_AVIOCONTEXT_BYTES_READ', aviocontext_bytes_read)
|
||||
conf_data.set10('HAVE_GLIBC_THREAD_NAME', glibc_thread_name and posix)
|
||||
conf_data.set10('HAVE_GL', gl['use'])
|
||||
conf_data.set10('HAVE_GL_COCOA', gl_cocoa.allowed())
|
||||
|
9
wscript
9
wscript
@ -411,15 +411,6 @@ FFmpeg libraries. Git master is recommended."
|
||||
'name': '--libavdevice',
|
||||
'desc': 'libavdevice',
|
||||
'func': check_pkg_config('libavdevice', '>= 57.0.0'),
|
||||
}, {
|
||||
# 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']),
|
||||
}
|
||||
]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user