Cosmetics (more checks, includes).
authorgb <gb@5584edef-b1fe-4b99-b61b-dd2bab72e969>
Thu, 4 Mar 2010 17:40:47 +0000 (17:40 +0000)
committergb <gb@5584edef-b1fe-4b99-b61b-dd2bab72e969>
Thu, 4 Mar 2010 17:40:47 +0000 (17:40 +0000)
gst-libs/gst/vaapi/gstvaapidisplay_x11.c
gst-libs/gst/vaapi/gstvaapidisplay_x11.h

index d215230fc60684604d22679cd0959e28bdce1e2c..3a2db88b8d15a4f46ae53b3b3cbaf708210036cc 100644 (file)
@@ -129,6 +129,8 @@ gst_vaapi_display_x11_get_display(GstVaapiDisplayX11 *display)
 {
     GstVaapiDisplayX11Private *priv = display->priv;
 
+    g_return_val_if_fail(GST_VAAPI_IS_DISPLAY_X11(display), NULL);
+
     return priv->display;
 }
 
@@ -138,6 +140,8 @@ gst_vaapi_display_x11_set_display(GstVaapiDisplayX11 *display,
 {
     GstVaapiDisplayX11Private *priv = display->priv;
 
+    g_return_if_fail(GST_VAAPI_IS_DISPLAY_X11(display));
+
     if (x11_display) {
         VADisplay va_display = vaGetDisplay(x11_display);
         if (va_display)
index 8633a02186f57d2de909073ede3933acb9c5aca2..bd7b22394d8d7c3d89cb6eca8f87e144152bc871 100644 (file)
@@ -21,7 +21,7 @@
 #ifndef GST_VAAPI_DISPLAY_X11_H
 #define GST_VAAPI_DISPLAY_X11_H
 
-#include "gstvaapidisplay.h"
+#include <gst/vaapi/gstvaapidisplay.h>
 #include <va/va_x11.h>
 
 G_BEGIN_DECLS