realign_frame called av_pix_fmt_count_planes with incorrect parameter.
Unified · Split
| @@ -666,7 +666,7 @@ static int realign_frame(const AVPixFmtDescriptor *desc, AVFrame **frame, int ne · 665 unmodified lines | ||
| 666 | 666 | int ret = 0, plane, planes; |
| 667 | 667 | |
| 668 | 668 | /* Realign any unaligned input frame. */ |
| 669 | − planes = av_pix_fmt_count_planes(desc->nb_components); | |
| 669 | + planes = av_pix_fmt_count_planes((*frame)->format); | |
| 670 | 670 | for (plane = 0; plane < planes; plane++) { |
| 671 | 671 | int p = desc->comp[plane].plane; |
| 672 | 672 | if ((uintptr_t)(*frame)->data[p] % ZIMG_ALIGNMENT || (*frame)->linesize[p] % ZIMG_ALIGNMENT) { |