[Pkg-gstreamer-commits] [gstreamer-vaapi] 132/176: vaapisink: fix display initialization in GstVideoOverlay implementation.

Vincent Cheng vcheng at moszumanska.debian.org
Tue Jun 3 08:09:34 UTC 2014


This is an automated email from the git hooks/post-receive script.

vcheng pushed a commit to branch upstream
in repository gstreamer-vaapi.

commit f8666e2cae518c0514c3b2944e4607502f7ba350
Author: Holger Kaelberer <hk at getslash.de>
Date:   Wed Jan 15 10:05:45 2014 +0100

    vaapisink: fix display initialization in GstVideoOverlay implementation.
    
    When gst_vaapisink_video_overlay_set_window_handle() is called early,
    before the pipeline has been set to PLAYING, the display has not yet
    been initialized and _PLUGIN_BASE_DISPLAY_TYPE() is not yet
    up-to-date. For this reason the foreign XID is not attached.
    
    Now _ensure_display() is called earlier.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=722244
    
    Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne at intel.com>
---
 gst/vaapi/gstvaapisink.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/gst/vaapi/gstvaapisink.c b/gst/vaapi/gstvaapisink.c
index 09d6d54..9c5ecd2 100644
--- a/gst/vaapi/gstvaapisink.c
+++ b/gst/vaapi/gstvaapisink.c
@@ -139,6 +139,9 @@ enum {
 #define DEFAULT_DISPLAY_TYPE            GST_VAAPI_DISPLAY_TYPE_ANY
 #define DEFAULT_ROTATION                GST_VAAPI_ROTATION_0
 
+static inline gboolean
+gst_vaapisink_ensure_display(GstVaapiSink *sink);
+
 /* GstVideoOverlay interface */
 
 #if USE_X11
@@ -154,7 +157,11 @@ gst_vaapisink_video_overlay_set_window_handle(GstVideoOverlay *overlay,
     guintptr window)
 {
     GstVaapiSink * const sink = GST_VAAPISINK(overlay);
-    GstVaapiDisplayType display_type = GST_VAAPI_PLUGIN_BASE_DISPLAY_TYPE(sink);
+    GstVaapiDisplayType display_type;
+
+    if (!gst_vaapisink_ensure_display(sink))
+        return;
+    display_type = GST_VAAPI_PLUGIN_BASE_DISPLAY_TYPE(sink);
 
     /* Disable GLX rendering when vaapisink is using a foreign X
        window. It's pretty much useless */

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gstreamer/gstreamer-vaapi.git



More information about the Pkg-gstreamer-commits mailing list