avfilter/vf_mix: use correct linesizes

Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
Paul B Mahol 2018-04-27 19:15:55 +02:00
parent 309fce63d8
commit b473e76876
1 changed files with 2 additions and 2 deletions

View File

@ -143,7 +143,7 @@ static int mix_frames(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
int val = 0;
for (i = 0; i < s->nb_inputs; i++) {
uint8_t src = in[i]->data[p][y * s->linesize[p] + x];
uint8_t src = in[i]->data[p][y * in[i]->linesize[p] + x];
val += src * s->weights[i];
}
@ -165,7 +165,7 @@ static int mix_frames(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
int val = 0;
for (i = 0; i < s->nb_inputs; i++) {
uint16_t src = AV_RN16(in[i]->data[p] + y * s->linesize[p] + x * 2);
uint16_t src = AV_RN16(in[i]->data[p] + y * in[i]->linesize[p] + x * 2);
val += src * s->weights[i];
}