From 3ff3749b7df335bda0fdf5a384b10dd3bb1ef584 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 1 May 2016 20:11:15 +0200 Subject: av_log: readd ffmpeg library runtime version mismatch warning It just happens far too often. --- common/av_log.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3