summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2019-10-11 21:28:04 +0200
committerwm4 <wm4@nowhere>2019-10-11 21:28:04 +0200
commita85fa2d2de92a89258da6b8bf6d814cf47824a0e (patch)
tree65cca35916c2b740263dae55ad4450477e266f7f
parent9683617559b8d9cab5f6e70d90f8de399d8d75e0 (diff)
downloadmpv-a85fa2d2de92a89258da6b8bf6d814cf47824a0e.tar.bz2
mpv-a85fa2d2de92a89258da6b8bf6d814cf47824a0e.tar.xz
player: accept compatible later FFmpeg library runtime versions
mpv warned if the FFmpeg runtime library version was not exactly the same as the build version. This seemed to cause frequent conflicts. At this point, most mpv code probably adheres to the FFmpeg ABI rules, and FFmpeg stopped breaking ABI "accidentally". Another source of problems were mixed FFmpeg/Libav installations, something which nobody does anymore. It's not "our" job to check and enforce ABI compatibility either. So I guess this behavior can be removed. OK, still check for incompatible libraries (according to FFmpeg versioning rules), i.e. different major versions, or if the build version is newer than the runtime version. For now. The comment about ABI problems is still true. In particular, the bytes_read field mentioned in the removed comment is still accessed, and is still an ABI violation. Have fun.
-rw-r--r--common/av_log.c3
-rw-r--r--player/main.c12
2 files changed, 4 insertions, 11 deletions
diff --git a/common/av_log.c b/common/av_log.c
index a9a5171795..8b0cb09efa 100644
--- a/common/av_log.c
+++ b/common/av_log.c
@@ -210,7 +210,8 @@ bool print_libav_versions(struct mp_log *log, int v)
mp_msg(log, v, " %-15s %d.%d.%d", l->name, V(l->buildv));
if (l->buildv != l->runv) {
mp_msg(log, v, " (runtime %d.%d.%d)", V(l->runv));
- mismatch = true;
+ mismatch = l->buildv > l->runv ||
+ AV_VERSION_MAJOR(l->buildv) != AV_VERSION_MAJOR(l->runv);
}
mp_msg(log, v, "\n");
}
diff --git a/player/main.c b/player/main.c
index bc6a3b1f97..70697a2a6e 100644
--- a/player/main.c
+++ b/player/main.c
@@ -385,19 +385,11 @@ int mp_initialize(struct MPContext *mpctx, char **options)
return 1; // help
if (!print_libav_versions(mp_null_log, 0)) {
- // Using mismatched libraries can be legitimate, but even then it's
- // a bad idea. We don't acknowledge its usefulness and stability.
- // Distro maintainers who patch this out should be aware that mpv
- // intentionally ignores ABI in some places where it's not possible to
- // get by without violating it.
- // Known API/ABI violations:
- // - AVIOContext.bytes_read (demux_lavf.c)
print_libav_versions(mpctx->log, MSGL_FATAL);
- MP_FATAL(mpctx, "\nmpv was compiled against a different version of "
+ MP_FATAL(mpctx, "\nmpv was compiled against an incompatible version of "
"FFmpeg/Libav than the shared\nlibrary it is linked against. "
"This is most likely a broken build and could\nresult in "
- "misbehavior and crashes.\n\nmpv does not support this "
- "configuration and will not run - rebuild mpv instead.\n");
+ "misbehavior and crashes.\n\nThis is a broken build.\n");
return -1;
}