realign_frame called av_pix_fmt_count_planes with incorrect parameter.
---
libavfilter/vf_zscale.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavfilter/vf_zscale.c b/libavfilter/vf_zscale.c
index 4ba059064b..c29c599000 100644
--- a/libavfilter/vf_zscale.c
+++ b/libavfilter/vf_zscale.c
@@ -663,7 +663,7 @@ static int realign_frame(const AVPixFmtDescriptor *desc,
AVFrame **frame, int ne
int ret = 0, plane, planes;
/* 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++) {
int p = desc->comp[plane].plane;
if ((uintptr_t)(*frame)->data[p] % ZIMG_ALIGNMENT ||
(*frame)->linesize[p] % ZIMG_ALIGNMENT) {
--
2.43.0
_______________________________________________
ffmpeg-devel mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".