0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 20:03:10 +02:00

vd_lavc: fix inverted error check

Dumb.
This commit is contained in:
wm4 2017-02-16 17:00:37 +01:00
parent 807147d9c0
commit fdd1ef6028

View File

@ -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;