From f53135ffea60ff45b05a65035bafc21f1aab46ee Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 17 Jun 2015 14:52:31 +0200 Subject: av_log: set default av_log callback on exit This is slightly "dangerous", because it could overwrite a log callback another library has set, after we've set our own callback. But it's probably still slightly better than leaving our own callback, which will run the fallback code if no mpv instance is set. (Multiple mpv instances sharing the same global state will safely avoid overwriting each other's log callback.) Note that we can't do much better, because the global state in FFmpeg is obviously insane. --- common/av_log.c | 1 + 1 file changed, 1 insertion(+) (limited to 'common/av_log.c') diff --git a/common/av_log.c b/common/av_log.c index e5c414fca9..0dbda72866 100644 --- a/common/av_log.c +++ b/common/av_log.c @@ -173,6 +173,7 @@ void uninit_libav(struct mpv_global *global) { pthread_mutex_lock(&log_lock); if (log_mpv_instance == global) { + av_log_set_callback(av_log_default_callback); log_mpv_instance = NULL; talloc_free(log_root); } -- cgit v1.2.3