avfilter/vf_maskedmerge: fix bug when copying >8bit plane(s)
Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
parent
710c97d5f6
commit
f4218d93ef
@ -27,6 +27,7 @@
|
|||||||
typedef struct MaskedMergeContext {
|
typedef struct MaskedMergeContext {
|
||||||
const AVClass *class;
|
const AVClass *class;
|
||||||
int width[4], height[4];
|
int width[4], height[4];
|
||||||
|
int linesize[4];
|
||||||
int nb_planes;
|
int nb_planes;
|
||||||
int planes;
|
int planes;
|
||||||
int half, depth;
|
int half, depth;
|
||||||
|
@ -91,7 +91,7 @@ static int process_frame(FFFrameSync *fs)
|
|||||||
for (p = 0; p < s->nb_planes; p++) {
|
for (p = 0; p < s->nb_planes; p++) {
|
||||||
if (!((1 << p) & s->planes)) {
|
if (!((1 << p) & s->planes)) {
|
||||||
av_image_copy_plane(out->data[p], out->linesize[p], base->data[p], base->linesize[p],
|
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;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -229,6 +229,9 @@ static int config_output(AVFilterLink *outlink)
|
|||||||
outlink->sample_aspect_ratio = base->sample_aspect_ratio;
|
outlink->sample_aspect_ratio = base->sample_aspect_ratio;
|
||||||
outlink->frame_rate = base->frame_rate;
|
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)
|
if ((ret = ff_framesync_init(&s->fs, ctx, 3)) < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user