diff options
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; } |