[FFmpeg-cvslog] avfilter/vf_extractplanes: check ff_insert_outpad() for failure
Paul B Mahol
git at videolan.org
Fri Aug 25 11:35:12 EEST 2017
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Fri Aug 25 09:57:53 2017 +0200| [99dd47a647529a82036682259f4c077dcd3a38af] | committer: Paul B Mahol
avfilter/vf_extractplanes: check ff_insert_outpad() for failure
Signed-off-by: Paul B Mahol <onemda at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=99dd47a647529a82036682259f4c077dcd3a38af
---
libavfilter/vf_extractplanes.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/libavfilter/vf_extractplanes.c b/libavfilter/vf_extractplanes.c
index f2118e6599..fc676a25fa 100644
--- a/libavfilter/vf_extractplanes.c
+++ b/libavfilter/vf_extractplanes.c
@@ -348,7 +348,7 @@ static av_cold int init(AVFilterContext *ctx)
{
ExtractPlanesContext *s = ctx->priv;
int planes = (s->requested_planes & 0xf) | (s->requested_planes >> 4);
- int i;
+ int i, ret;
for (i = 0; i < 4; i++) {
char *name;
@@ -365,7 +365,10 @@ static av_cold int init(AVFilterContext *ctx)
pad.type = AVMEDIA_TYPE_VIDEO;
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;
More information about the ffmpeg-cvslog
mailing list