[vlc-commits] vout: opengl: return in case of mem alloc fail

Thomas Guillem git at videolan.org
Sun Dec 4 10:53:05 CET 2016


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Dec  1 12:59:59 2016 +0100| [46b6e7af7640bc827a37c482948cf8de7034b57c] | committer: Thomas Guillem

vout: opengl: return in case of mem alloc fail

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

 modules/video_output/opengl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/video_output/opengl.c b/modules/video_output/opengl.c
index c162b4a..bad83c2 100644
--- a/modules/video_output/opengl.c
+++ b/modules/video_output/opengl.c
@@ -357,7 +357,7 @@ static void BuildYUVFragmentShader(vout_display_opengl_t *vgl,
     if (asprintf(&code, template_glsl_yuv,
                  swap_uv ? 'z' : 'y',
                  swap_uv ? 'y' : 'z') < 0)
-        code = NULL;
+        return;
 
     for (int i = 0; i < 4; i++) {
         float correction = i < 3 ? yuv_range_correction : 1.f;



More information about the vlc-commits mailing list