lavfi/vf_zscale: fix call to av_pix_fmt_count_planes

realign_frame called av_pix_fmt_count_planes with incorrect parameter.

Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit 00cf3df03f)
release/7.1
Pavel Koshevoy 2 months ago committed by James Almer
parent 85f389520d
commit 5b461ffb04
  1. 2
      libavfilter/vf_zscale.c

@ -664,7 +664,7 @@ static int realign_frame(const AVPixFmtDescriptor *desc, AVFrame **frame, int ne
int ret = 0, plane, planes; int ret = 0, plane, planes;
/* Realign any unaligned input frame. */ /* Realign any unaligned input frame. */
planes = av_pix_fmt_count_planes(desc->nb_components); planes = av_pix_fmt_count_planes((*frame)->format);
for (plane = 0; plane < planes; plane++) { for (plane = 0; plane < planes; plane++) {
int p = desc->comp[plane].plane; int p = desc->comp[plane].plane;
if ((uintptr_t)(*frame)->data[p] % ZIMG_ALIGNMENT || (*frame)->linesize[p] % ZIMG_ALIGNMENT) { if ((uintptr_t)(*frame)->data[p] % ZIMG_ALIGNMENT || (*frame)->linesize[p] % ZIMG_ALIGNMENT) {

Loading…
Cancel
Save