realign_frame called av_pix_fmt_count_planes with incorrect parameter.
Showing the changes to libavfilter (1 of 1 file). Show all
Unified · Split
| @@ -666,7 +666,7 @@ static int realign_frame(const AVPixFmtDescriptor *desc, AVFrame **frame, int ne · 665 unmodified lines | |||
| 666 | int ret = 0, plane, planes; | 666 | int ret = 0, plane, planes; |
| 667 | 667 | ||
| 668 | /* Realign any unaligned input frame. */ | 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 | for (plane = 0; plane < planes; plane++) { | 670 | for (plane = 0; plane < planes; plane++) { |
| 671 | int p = desc->comp[plane].plane; | 671 | int p = desc->comp[plane].plane; |
| 672 | if ((uintptr_t)(*frame)->data[p] % ZIMG_ALIGNMENT || (*frame)->linesize[p] % ZIMG_ALIGNMENT) { | 672 | if ((uintptr_t)(*frame)->data[p] % ZIMG_ALIGNMENT || (*frame)->linesize[p] % ZIMG_ALIGNMENT) { |