avfilter/vf_extractplanes: check ff_insert_outpad() for failure
Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
@@ -348,7 +348,7 @@ static av_cold int init(AVFilterContext *ctx)
|
|||||||
{
|
{
|
||||||
ExtractPlanesContext *s = ctx->priv;
|
ExtractPlanesContext *s = ctx->priv;
|
||||||
int planes = (s->requested_planes & 0xf) | (s->requested_planes >> 4);
|
int planes = (s->requested_planes & 0xf) | (s->requested_planes >> 4);
|
||||||
int i;
|
int i, ret;
|
||||||
|
|
||||||
for (i = 0; i < 4; i++) {
|
for (i = 0; i < 4; i++) {
|
||||||
char *name;
|
char *name;
|
||||||
@@ -365,7 +365,10 @@ static av_cold int init(AVFilterContext *ctx)
|
|||||||
pad.type = AVMEDIA_TYPE_VIDEO;
|
pad.type = AVMEDIA_TYPE_VIDEO;
|
||||||
pad.config_props = config_output;
|
pad.config_props = config_output;
|
||||||
|
|
||||||
ff_insert_outpad(ctx, ctx->nb_outputs, &pad);
|
if ((ret = ff_insert_outpad(ctx, ctx->nb_outputs, &pad)) < 0) {
|
||||||
|
av_freep(&pad.name);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Reference in New Issue
Block a user