diff options
author | Paul B Mahol <onemda@gmail.com> | 2017-04-23 18:31:05 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2017-04-23 18:31:05 +0200 |
commit | f4218d93efaefb2fb1a1dfcf45d6917a397e96ed (patch) | |
tree | b4131e6538b7c215debe4b0fcf433c1c1d93c1b3 /libavfilter/vf_maskedmerge.c | |
parent | 710c97d5f6a880597701ea7b3ad56920cd0fb731 (diff) | |
download | ffmpeg-f4218d93efaefb2fb1a1dfcf45d6917a397e96ed.tar.gz |
avfilter/vf_maskedmerge: fix bug when copying >8bit plane(s)
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavfilter/vf_maskedmerge.c')
-rw-r--r-- | libavfilter/vf_maskedmerge.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavfilter/vf_maskedmerge.c b/libavfilter/vf_maskedmerge.c index 2c42d62d8a..cf8a56814e 100644 --- a/libavfilter/vf_maskedmerge.c +++ b/libavfilter/vf_maskedmerge.c @@ -91,7 +91,7 @@ static int process_frame(FFFrameSync *fs) for (p = 0; p < s->nb_planes; p++) { if (!((1 << p) & s->planes)) { av_image_copy_plane(out->data[p], out->linesize[p], base->data[p], base->linesize[p], - s->width[p], s->height[p]); + s->linesize[p], s->height[p]); continue; } @@ -229,6 +229,9 @@ static int config_output(AVFilterLink *outlink) outlink->sample_aspect_ratio = base->sample_aspect_ratio; outlink->frame_rate = base->frame_rate; + if ((ret = av_image_fill_linesizes(s->linesize, outlink->format, outlink->w)) < 0) + return ret; + if ((ret = ff_framesync_init(&s->fs, ctx, 3)) < 0) return ret; |