diff options
author | James Almer <jamrial@gmail.com> | 2019-03-01 20:48:35 +0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2019-03-13 01:07:50 +0300 |
commit | dcf64b599d3132bec3a9f52139de716d70f0fb4e (patch) | |
tree | dcb1b26584ea85f1913a12dc1e2fecfece859ed6 /libavcodec/libdav1d.c | |
parent | d227ed5d598340e719eff7156b1aa0a4469e9a6a (diff) |
avcodec/libdav1d: route dav1d internal logs through av_log()
Bump the minimum required version to the first one with the logger API callback.
Reviewed-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/libdav1d.c')
-rw-r--r-- | libavcodec/libdav1d.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libavcodec/libdav1d.c b/libavcodec/libdav1d.c index ed02da4ebf..459bbae687 100644 --- a/libavcodec/libdav1d.c +++ b/libavcodec/libdav1d.c @@ -37,6 +37,13 @@ typedef struct Libdav1dContext { int apply_grain; } Libdav1dContext; +static void libdav1d_log_callback(void *opaque, const char *fmt, va_list vl) +{ + AVCodecContext *c = opaque; + + av_vlog(c, AV_LOG_ERROR, fmt, vl); +} + static av_cold int libdav1d_init(AVCodecContext *c) { Libdav1dContext *dav1d = c->priv_data; @@ -46,6 +53,8 @@ static av_cold int libdav1d_init(AVCodecContext *c) av_log(c, AV_LOG_INFO, "libdav1d %s\n", dav1d_version()); dav1d_default_settings(&s); + s.logger.cookie = c; + s.logger.callback = libdav1d_log_callback; s.n_tile_threads = dav1d->tile_threads; s.apply_grain = dav1d->apply_grain; s.n_frame_threads = FFMIN(c->thread_count ? c->thread_count : av_cpu_count(), DAV1D_MAX_FRAME_THREADS); |