[FFmpeg-cvslog] avfilter/f_select: check ff_insert_outpad() for failure

Paul B Mahol git at videolan.org
Fri Aug 25 11:35:28 EEST 2017


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Fri Aug 25 10:04:28 2017 +0200| [01b986cf1819320aff5d5c7a43401bb74a95524a] | committer: Paul B Mahol

avfilter/f_select: 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=01b986cf1819320aff5d5c7a43401bb74a95524a
---

 libavfilter/f_select.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libavfilter/f_select.c b/libavfilter/f_select.c
index c8602626b5..b1b2cbc21a 100644
--- a/libavfilter/f_select.c
+++ b/libavfilter/f_select.c
@@ -186,7 +186,10 @@ static av_cold int init(AVFilterContext *ctx)
             return AVERROR(ENOMEM);
         pad.type = ctx->filter->inputs[0].type;
         pad.request_frame = request_frame;
-        ff_insert_outpad(ctx, i, &pad);
+        if ((ret = ff_insert_outpad(ctx, i, &pad)) < 0) {
+            av_freep(&pad.name);
+            return ret;
+        }
     }
 
     return 0;



More information about the ffmpeg-cvslog mailing list