summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-05-01 20:11:15 +0200
committerwm4 <wm4@nowhere>2016-05-01 20:11:15 +0200
commit3ff3749b7df335bda0fdf5a384b10dd3bb1ef584 (patch)
treef91843712870c6420335d72414a8b193d1a209c3 /common
parent622bcb0e37f39f2a542b42587ca442c6600b7414 (diff)
downloadmpv-3ff3749b7df335bda0fdf5a384b10dd3bb1ef584.tar.bz2
mpv-3ff3749b7df335bda0fdf5a384b10dd3bb1ef584.tar.xz
av_log: readd ffmpeg library runtime version mismatch warning
It just happens far too often.
Diffstat (limited to 'common')
-rw-r--r--common/av_log.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/common/av_log.c b/common/av_log.c
index bfd9a836e8..804972889f 100644
--- a/common/av_log.c
+++ b/common/av_log.c
@@ -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