diff options
author | wm4 <wm4@nowhere> | 2015-06-17 14:52:31 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-06-17 14:52:31 +0200 |
commit | f53135ffea60ff45b05a65035bafc21f1aab46ee (patch) | |
tree | ba21e70177b929e64cf2e4419e0c38140c105cb2 | |
parent | d4aaf29a05b3f8d434371d970d878861694a37f2 (diff) |
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.
-rw-r--r-- | common/av_log.c | 1 |
1 files changed, 1 insertions, 0 deletions
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); } |