[FFmpeg-cvslog] avfilter/vf_stereo3d: assert that out variable is valid

Paul B Mahol git at videolan.org
Mon Sep 16 12:49:40 EEST 2019


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Mon Sep 16 11:45:28 2019 +0200| [94f187d382675fe8c4425bcc349859741f20439d] | committer: Paul B Mahol

avfilter/vf_stereo3d: assert that out variable is valid

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=94f187d382675fe8c4425bcc349859741f20439d
---

 libavfilter/vf_stereo3d.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavfilter/vf_stereo3d.c b/libavfilter/vf_stereo3d.c
index 5cbee393d8..ff17b07c3d 100644
--- a/libavfilter/vf_stereo3d.c
+++ b/libavfilter/vf_stereo3d.c
@@ -672,7 +672,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *inpicref)
     AVFilterContext *ctx  = inlink->dst;
     Stereo3DContext *s = ctx->priv;
     AVFilterLink *outlink = ctx->outputs[0];
-    AVFrame *out, *oleft, *oright, *ileft, *iright;
+    AVFrame *out = NULL, *oleft, *oright, *ileft, *iright;
     int out_off_left[4], out_off_right[4];
     int i, ret;
 
@@ -1082,6 +1082,7 @@ copy:
         av_frame_free(&s->prev);
         av_frame_free(&inpicref);
     }
+    av_assert0(out);
     out->sample_aspect_ratio = s->aspect;
     return ff_filter_frame(outlink, out);
 }



More information about the ffmpeg-cvslog mailing list