Commit 0ad5ef67 authored by Paul B Mahol's avatar Paul B Mahol

avfilter/vf_decimate: fix crash with gray8

Signed-off-by: 's avatarPaul B Mahol <onemda@gmail.com>
parent 1f5d1342
......@@ -86,7 +86,7 @@ static void calc_diffs(const DecimateContext *dm, struct qitem *q,
memset(bdiffs, 0, dm->bdiffsize * sizeof(*bdiffs));
for (plane = 0; plane < (dm->chroma ? 3 : 1); plane++) {
for (plane = 0; plane < (dm->chroma && f1->data[2] ? 3 : 1); plane++) {
int x, y, xl;
const int linesize1 = f1->linesize[plane];
const int linesize2 = f2->linesize[plane];
......
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