egl: Fix some return values in g_return_val_if_fail()

This commit is contained in:
Sebastian Dröge 2013-03-19 14:31:14 +01:00
parent 66d0d86e78
commit 8f9c2e8e44

View file

@ -71,7 +71,7 @@ gst_egl_image_memory_get_image (GstMemory * mem)
GstEGLDisplay * GstEGLDisplay *
gst_egl_image_memory_get_display (GstMemory * mem) gst_egl_image_memory_get_display (GstMemory * mem)
{ {
g_return_val_if_fail (gst_is_egl_image_memory (mem), EGL_NO_IMAGE_KHR); g_return_val_if_fail (gst_is_egl_image_memory (mem), NULL);
if (mem->parent) if (mem->parent)
mem = mem->parent; mem = mem->parent;
@ -95,7 +95,7 @@ GstEGLImageOrientation
gst_egl_image_memory_get_orientation (GstMemory *mem) gst_egl_image_memory_get_orientation (GstMemory *mem)
{ {
g_return_val_if_fail (gst_is_egl_image_memory (mem), g_return_val_if_fail (gst_is_egl_image_memory (mem),
GST_EGL_IMAGE_MEMORY_TYPE_INVALID); GST_EGL_IMAGE_ORIENTATION_X_NORMAL_Y_NORMAL);
if (mem->parent) if (mem->parent)
mem = mem->parent; mem = mem->parent;
@ -332,7 +332,7 @@ gst_egl_display_unref (GstEGLDisplay * display)
EGLDisplay EGLDisplay
gst_egl_display_get (GstEGLDisplay * display) gst_egl_display_get (GstEGLDisplay * display)
{ {
g_return_val_if_fail (display != NULL, NULL); g_return_val_if_fail (display != NULL, EGL_NO_DISPLAY);
return display->display; return display->display;
} }