summaryrefslogtreecommitdiffstats
path: root/video/decode
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-02-16 17:00:37 +0100
committerwm4 <wm4@nowhere>2017-02-16 17:00:37 +0100
commitfdd1ef60288842a51a431bfaab05f53ef0b8f532 (patch)
treef3a772c4a7a41c92c517054d533f64a6f9757580 /video/decode
parent807147d9c063bd8b9711f69f31579ccdef30efdf (diff)
downloadmpv-fdd1ef60288842a51a431bfaab05f53ef0b8f532.tar.bz2
mpv-fdd1ef60288842a51a431bfaab05f53ef0b8f532.tar.xz
vd_lavc: fix inverted error check
Dumb.
Diffstat (limited to 'video/decode')
-rw-r--r--video/decode/vd_lavc.c2
1 files changed, 1 insertions, 1 deletions
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;