diff options
author | wm4 <wm4@nowhere> | 2013-12-21 17:47:38 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-12-21 20:50:10 +0100 |
commit | 2eefa31c886723bcc30664ea9fe3e2420f2cc0c6 (patch) | |
tree | 4f3f6a163a46cf03ba4a2bc50b2527ebce40edc2 /video/decode/vda.c | |
parent | 426ebbae5ff578923a83a4395ff499f0348f7dcc (diff) | |
download | mpv-2eefa31c886723bcc30664ea9fe3e2420f2cc0c6.tar.bz2 mpv-2eefa31c886723bcc30664ea9fe3e2420f2cc0c6.tar.xz |
video/decode: mp_msg conversions
Doesn't cover vdpau/vaapi parts yet, because these are a bit messier.
Diffstat (limited to 'video/decode/vda.c')
-rw-r--r-- | video/decode/vda.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/video/decode/vda.c b/video/decode/vda.c index 7a21c5e10a..ab6f033455 100644 --- a/video/decode/vda.c +++ b/video/decode/vda.c @@ -73,16 +73,17 @@ static const struct vda_error vda_errors[] = { { 0, NULL }, }; -static void print_vda_error(int lev, char *message, int error_code) +static void print_vda_error(struct mp_log *log, int lev, char *message, + int error_code) { for (int n = 0; vda_errors[n].code < 0; n++) if (vda_errors[n].code == error_code) { - mp_msg(MSGT_DECVIDEO, lev, "%s: %s (%d)\n", - message, vda_errors[n].reason, error_code); + mp_msg_log(log, lev, "%s: %s (%d)\n", + message, vda_errors[n].reason, error_code); return; } - mp_msg(MSGT_DECVIDEO, lev, "%s: %d\n", message, error_code); + mp_msg_log(log, lev, "%s: %d\n", message, error_code); } static int probe(struct vd_lavc_hwdec *hwdec, struct mp_hwdec_info *info, @@ -134,7 +135,7 @@ static int init_vda_decoder(struct lavc_ctx *ctx) &p->vda_ctx, ctx->avctx->extradata, ctx->avctx->extradata_size); if (status) { - print_vda_error(MSGL_ERR, "[vda] failed to init decoder", status); + print_vda_error(ctx->log, "failed to init VDA decoder", status); return -1; } |