[Pkg-gstreamer-commits] [gstreamer-vaapi] 34/176: plugins: simplify gst_vaapi_ensure_display().

Vincent Cheng vcheng at moszumanska.debian.org
Tue Jun 3 08:09:25 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 16751205a26f138396ded661227cc99c146572d1
Author: Gwenole Beauchesne <gwenole.beauchesne at intel.com>
Date:   Fri Nov 29 13:56:12 2013 +0100

    plugins: simplify gst_vaapi_ensure_display().
    
    Return earlier if the creation of a VA display failed. Likewise, simplify
    gst_vaapi_video_context_propagate() now that we are guaranteed to have a
    valid VA display.
---
 gst/vaapi/gstvaapipluginutil.c   | 8 ++++----
 gst/vaapi/gstvaapivideocontext.c | 5 -----
 2 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/gst/vaapi/gstvaapipluginutil.c b/gst/vaapi/gstvaapipluginutil.c
index 82349a8..92f9ec5 100644
--- a/gst/vaapi/gstvaapipluginutil.c
+++ b/gst/vaapi/gstvaapipluginutil.c
@@ -139,12 +139,12 @@ gst_vaapi_ensure_display(
 
     /* If no neighboor, or application not interested, use system default */
     display = gst_vaapi_create_display(&display_type);
-
-    if (display_ptr)
-        *display_ptr = display;
+    if (!display)
+        return FALSE;
 
     gst_vaapi_video_context_propagate(context, display);
-    return display != NULL;
+    *display_ptr = display;
+    return TRUE;
 }
 
 void
diff --git a/gst/vaapi/gstvaapivideocontext.c b/gst/vaapi/gstvaapivideocontext.c
index e740983..551b79d 100644
--- a/gst/vaapi/gstvaapivideocontext.c
+++ b/gst/vaapi/gstvaapivideocontext.c
@@ -169,11 +169,6 @@ gst_vaapi_video_context_propagate(GstElement *element, GstVaapiDisplay *display)
     GstContext *context;
     GstMessage *msg;
 
-    if (!display) {
-        GST_ERROR_OBJECT(element, "failed to get VA-API display connection");
-        return;
-    }
-
     context = gst_vaapi_video_context_new_with_display(display, FALSE);
 
     GST_CAT_INFO_OBJECT(GST_CAT_CONTEXT, element,

-- 
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