[FFmpeg-cvslog] avfilter/vf_v360: do not ignore return value of allocate_plane()

Paul B Mahol git at videolan.org
Tue Jun 23 22:57:18 EEST 2020


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Tue Jun 23 21:53:39 2020 +0200| [ce297b44d3b107150c07017993c267a4b9bb41b0] | committer: Paul B Mahol

avfilter/vf_v360: do not ignore return value of allocate_plane()

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

 libavfilter/vf_v360.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/libavfilter/vf_v360.c b/libavfilter/vf_v360.c
index a056b76cb6..c021724fa3 100644
--- a/libavfilter/vf_v360.c
+++ b/libavfilter/vf_v360.c
@@ -4493,8 +4493,11 @@ static int config_output(AVFilterLink *outlink)
         s->map[1] = s->map[2] = 1;
     }
 
-    for (int i = 0; i < s->nb_allocated; i++)
-        allocate_plane(s, sizeof_uv, sizeof_ker, sizeof_mask * have_alpha * s->alpha, i);
+    for (int i = 0; i < s->nb_allocated; i++) {
+        err = allocate_plane(s, sizeof_uv, sizeof_ker, sizeof_mask * have_alpha * s->alpha, i);
+        if (err < 0)
+            return err;
+    }
 
     calculate_rotation_matrix(s->yaw, s->pitch, s->roll, s->rot_mat, s->rotation_order);
     set_mirror_modifier(s->h_flip, s->v_flip, s->d_flip, s->output_mirror_modifier);



More information about the ffmpeg-cvslog mailing list