On 15/03/2019 23:43, James Almer wrote:
Bump the minimum required version to the first one with the logger API callback.
---
configure | 2 +-
libavcodec/libdav1d.c | 9 +
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/configure b/configure
index 26455054b..a83990e7f 100755
--- a/configure
+++ b/configure
@@ -4676,7 +4676,7 @@ enabled libaom&& {
}
enabled libbs2b && require_pkg_config libbs2b libbs2b bs2b.h
bs2b_open
enabled libdc1394 && require_pkg_config libdc1394 libdc1394-2
dc1394/dc1394.h dc1394_new
-enabled libdav1d && require_pkg_config libdav1d "dav1d >= 0.1.0"
dav1d/dav1d.h dav1d_version
+enabled libdav1d && require_pkg_config libdav1d "dav1d >= 0.2.1"
dav1d/dav1d.h dav1d_version
enabled libdcadec && require libdcadec libdcadec/dca_context.h
dcadec_context_create -ldcadec
enabled libfaac && require libfaac "stdint.h faac.h"
faacEncGetVersion -lfaac
enabled libfdk_aac&& require_pkg_config libfdk_aac fdk-aac
"fdk-aac/aacenc_lib.h" aacEncOpen
diff --git a/libavcodec/libdav1d.c b/libavcodec/libdav1d.c
index c6ccc3827..22fcb0df5 100644
--- a/libavcodec/libdav1d.c
+++ b/libavcodec/libdav1d.c
@@ -39,6 +39,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;
@@ -48,6 +55,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);
Sure.
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel