diff --git a/libavfilter/buffersrc.c b/libavfilter/buffersrc.c index 19419e6d25..2219ba5f81 100644 --- a/libavfilter/buffersrc.c +++ b/libavfilter/buffersrc.c @@ -193,7 +193,7 @@ do { \ } for (i = 0; i < planes; i++) { - int v_shift = (i == 1 || i == 2) ? desc->log2_chroma_w : 0; + int v_shift = (i == 1 || i == 2) ? desc->log2_chroma_h : 0; int plane_size = (frame->height >> v_shift) * frame->linesize[i]; WRAP_PLANE(frame->buf[i], frame->data[i], plane_size);