Commit ec11cfdf authored by Jean Delvare's avatar Jean Delvare Committed by Michael Niedermayer

avfilter/vf_delogo: Use AVPixFmtDescriptor.nb_components

Relying on AVPixFmtDescriptor.nb_components is cleaner and faster than
checking data and linesize for every possible plane.
Signed-off-by: 's avatarJean Delvare <jdelvare@suse.de>
Reviewed-by: 's avatarPaul B Mahol <onemda@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent c18176bd
......@@ -256,7 +256,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
if (!sar.num)
sar.num = sar.den = 1;
for (plane = 0; plane < 4 && in->data[plane] && in->linesize[plane]; plane++) {
for (plane = 0; plane < desc->nb_components; plane++) {
int hsub = plane == 1 || plane == 2 ? hsub0 : 0;
int vsub = plane == 1 || plane == 2 ? vsub0 : 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment