mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-24 12:09:55 +00:00
avfilter/vf_pad: Fix segfault if reconfiguration fails
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
28307ef7e6
commit
3d8a8fd27e
@ -210,12 +210,16 @@ static int config_output(AVFilterLink *outlink)
|
||||
static AVFrame *get_video_buffer(AVFilterLink *inlink, int w, int h)
|
||||
{
|
||||
PadContext *s = inlink->dst->priv;
|
||||
|
||||
AVFrame *frame = ff_get_video_buffer(inlink->dst->outputs[0],
|
||||
w + (s->w - s->in_w),
|
||||
h + (s->h - s->in_h) + (s->x > 0));
|
||||
AVFrame *frame;
|
||||
int plane;
|
||||
|
||||
if (s->inlink_w <= 0)
|
||||
return NULL;
|
||||
|
||||
frame = ff_get_video_buffer(inlink->dst->outputs[0],
|
||||
w + (s->w - s->in_w),
|
||||
h + (s->h - s->in_h) + (s->x > 0));
|
||||
|
||||
if (!frame)
|
||||
return NULL;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user