From fdd1ef60288842a51a431bfaab05f53ef0b8f532 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 16 Feb 2017 17:00:37 +0100 Subject: vd_lavc: fix inverted error check Dumb. --- video/decode/vd_lavc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'video/decode') diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c index 77b8bf439d..cd054f7ea4 100644 --- a/video/decode/vd_lavc.c +++ b/video/decode/vd_lavc.c @@ -665,7 +665,7 @@ int hwdec_setup_hw_frames_ctx(struct lavc_ctx *ctx, AVBufferRef *device_ctx, fctx->initial_pool_size = initial_pool_size; int res = av_hwframe_ctx_init(ctx->cached_hw_frames_ctx); - if (res > 0) { + if (res < 0) { MP_ERR(ctx, "Failed to allocate hw frames.\n"); av_buffer_unref(&ctx->cached_hw_frames_ctx); return -1; -- cgit v1.2.3