[vlc-commits] chroma: cvpx: simplify error handling

Thomas Guillem git at videolan.org
Wed Apr 18 13:42:17 CEST 2018


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Apr 18 13:41:58 2018 +0200| [90d4d1f0184aab59ae883800ca429bdd1a55315b] | committer: Thomas Guillem

chroma: cvpx: simplify error handling

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=90d4d1f0184aab59ae883800ca429bdd1a55315b
---

 modules/video_chroma/cvpx.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/modules/video_chroma/cvpx.c b/modules/video_chroma/cvpx.c
index c0aa0d66e1..9c586b63c7 100644
--- a/modules/video_chroma/cvpx.c
+++ b/modules/video_chroma/cvpx.c
@@ -315,13 +315,12 @@ static int Open(vlc_object_t *obj)
 
     if (b_need_pool
      && (p_sys->pool = cvpxpool_create(&p_filter->fmt_out.video, 3)) == NULL)
-        goto error;
+    {
+        Close(obj);
+        return VLC_EGENERIC;
+    }
 
     return VLC_SUCCESS;
-
-error:
-    Close(obj);
-    return VLC_EGENERIC;
 #undef CASE_CVPX_INPUT
 #undef CASE_CVPX_OUTPUT
 }



More information about the vlc-commits mailing list