summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2022-01-24 14:49:13 -0600
committerJan Ekström <jeebjp@gmail.com>2022-01-25 00:17:01 +0200
commit8087e3371f8ffbdc8ddcbc0445392b0480ef02a4 (patch)
treee9f37a8ad9b5a4443236cb368e664201f00bd44c
parente809ef04415c137702a45a9335e4c3591f461b8b (diff)
downloadmpv-master.tar.bz2
mpv-master.tar.xz
build: remove aviocontext bytes_read checkHEADmaster
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 78cfeee2b93830f2988508a653b508336147b79d. 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.
-rw-r--r--.github/workflows/build.yml2
-rw-r--r--demux/demux_lavf.c4
-rw-r--r--meson.build8
-rw-r--r--wscript9
4 files changed, 1 insertions, 22 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index b4fd84f006..1524d584cd 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -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: |
diff --git a/demux/demux_lavf.c b/demux/demux_lavf.c
index 3a1283cb33..03c0a1fa0d 100644
--- a/demux/demux_lavf.c
+++ b/demux/demux_lavf.c
@@ -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
diff --git a/meson.build b/meson.build
index c9f91f41a5..842241b363 100644
--- a/meson.build
+++ b/meson.build
@@ -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())
diff --git a/wscript b/wscript
index 074fe8277e..87a3bd6f65 100644
--- a/wscript
+++ b/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']),
}
]