mirror of
https://github.com/mpv-player/mpv
synced 2024-12-22 23:02:37 +00:00
av_log: readd ffmpeg library runtime version mismatch warning
It just happens far too often.
This commit is contained in:
parent
622bcb0e37
commit
3ff3749b7d
@ -207,17 +207,29 @@ void print_libav_versions(struct mp_log *log, int v)
|
||||
|
||||
mp_msg(log, v, "%s library versions:\n", LIB_PREFIX);
|
||||
|
||||
bool mismatch = false;
|
||||
for (int n = 0; n < MP_ARRAY_SIZE(libs); n++) {
|
||||
const struct lib *l = &libs[n];
|
||||
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));
|
||||
mismatch = true;
|
||||
}
|
||||
mp_msg(log, v, "\n");
|
||||
}
|
||||
|
||||
#if HAVE_AV_VERSION_INFO
|
||||
mp_msg(log, v, "%s version: %s\n", LIB_PREFIX, av_version_info());
|
||||
#endif
|
||||
|
||||
if (mismatch) {
|
||||
// Using mismatched libraries can be legitimate, but even then it's
|
||||
// a bad idea. We don't acknowledge its usefulness and stability.
|
||||
mp_warn(log, "Warning: mpv was compiled against a different version of "
|
||||
"%s than the shared\nlibrary it is linked against. This is "
|
||||
"most likely a broken build\nand misbehavior and crashes are "
|
||||
"to be expected.\n", LIB_PREFIX);
|
||||
}
|
||||
}
|
||||
|
||||
#undef V
|
||||
|
Loading…
Reference in New Issue
Block a user