[vlc-commits] caopengllayer: don't pass invalid pics to the OpenGL context

Felix Paul Kühne git at videolan.org
Mon Apr 28 19:37:25 CEST 2014


vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Mon Apr 28 19:36:35 2014 +0200| [39698bf75015077b46d1dce02e4e3770e950bbc8] | committer: Felix Paul Kühne

caopengllayer: don't pass invalid pics to the OpenGL context

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

 modules/video_output/caopengllayer.m |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/modules/video_output/caopengllayer.m b/modules/video_output/caopengllayer.m
index a6adb30..9ee27b9 100644
--- a/modules/video_output/caopengllayer.m
+++ b/modules/video_output/caopengllayer.m
@@ -256,6 +256,11 @@ static void PictureRender (vout_display_t *vd, picture_t *pic, subpicture_t *sub
 {
     vout_display_sys_t *sys = vd->sys;
 
+    if (pic == NULL) {
+        msg_Warn(vd, "invalid pic, skipping frame");
+        return;
+    }
+
     @synchronized (sys->cgLayer) {
         vout_display_opengl_Prepare(sys->vgl, pic, subpicture);
     }



More information about the vlc-commits mailing list