Commit 3d8a8fd2 authored by Michael Niedermayer's avatar Michael Niedermayer

avfilter/vf_pad: Fix segfault if reconfiguration fails

Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 28307ef7
......@@ -210,11 +210,15 @@ static int config_output(AVFilterLink *outlink)
static AVFrame *get_video_buffer(AVFilterLink *inlink, int w, int h)
{
PadContext *s = inlink->dst->priv;
AVFrame *frame;
int plane;
if (s->inlink_w <= 0)
return NULL;
AVFrame *frame = ff_get_video_buffer(inlink->dst->outputs[0],
frame = ff_get_video_buffer(inlink->dst->outputs[0],
w + (s->w - s->in_w),
h + (s->h - s->in_h) + (s->x > 0));
int plane;
if (!frame)
return NULL;
......
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