mirror of https://github.com/mpv-player/mpv
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.
This commit is contained in:
parent
9683617559
commit
a85fa2d2de
|
@ -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));
|
mp_msg(log, v, " %-15s %d.%d.%d", l->name, V(l->buildv));
|
||||||
if (l->buildv != l->runv) {
|
if (l->buildv != l->runv) {
|
||||||
mp_msg(log, v, " (runtime %d.%d.%d)", V(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");
|
mp_msg(log, v, "\n");
|
||||||
}
|
}
|
||||||
|
|
|
@ -385,19 +385,11 @@ int mp_initialize(struct MPContext *mpctx, char **options)
|
||||||
return 1; // help
|
return 1; // help
|
||||||
|
|
||||||
if (!print_libav_versions(mp_null_log, 0)) {
|
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);
|
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. "
|
"FFmpeg/Libav than the shared\nlibrary it is linked against. "
|
||||||
"This is most likely a broken build and could\nresult in "
|
"This is most likely a broken build and could\nresult in "
|
||||||
"misbehavior and crashes.\n\nmpv does not support this "
|
"misbehavior and crashes.\n\nThis is a broken build.\n");
|
||||||
"configuration and will not run - rebuild mpv instead.\n");
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue