[vlc-commits] commit: Fixed a segfault with opengl provider. (Laurent Aimar )

git at videolan.org git at videolan.org
Sun Jun 27 19:04:45 CEST 2010


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Sat Jun 26 23:07:09 2010 +0200| [7d5dbadace37c60324afb93d0c572776da0dc658] | committer: Laurent Aimar 

Fixed a segfault with opengl provider.

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

 src/video_output/display.c |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/src/video_output/display.c b/src/video_output/display.c
index af80213..af73be8 100644
--- a/src/video_output/display.c
+++ b/src/video_output/display.c
@@ -681,12 +681,29 @@ static vout_window_t *VoutDisplayNewWindow(vout_display_t *vd, const vout_window
 {
     vout_display_owner_sys_t *osys = vd->owner.sys;
 
+#ifdef ALLOW_DUMMY_VOUT
+    if (!osys->vout->p) {
+        vout_window_cfg_t cfg_override = *cfg;
+
+        if (!var_InheritBool(osys->vout, "embedded-video"))
+            cfg_override.is_standalone = true;
+
+        return vout_window_New(VLC_OBJECT(osys->vout), NULL, &cfg_override);
+    }
+#endif
     return vout_NewDisplayWindow(osys->vout, vd, cfg);
 }
 static void VoutDisplayDelWindow(vout_display_t *vd, vout_window_t *window)
 {
     vout_display_owner_sys_t *osys = vd->owner.sys;
 
+#ifdef ALLOW_DUMMY_VOUT
+    if (!osys->vout->p) {
+        if( window)
+            vout_window_Delete(window);
+        return;
+    }
+#endif
     vout_DeleteDisplayWindow(osys->vout, vd, window);
 }
 



More information about the vlc-commits mailing list