eglglessink: Correctly return GstFlowReturn from render_and_display()

This commit is contained in:
Reynaldo H. Verdejo Pinochet 2012-09-11 12:04:30 -03:00 committed by Sebastian Dröge
parent cca08a02a1
commit b8c83f98b7

View file

@ -240,7 +240,7 @@ static gboolean gst_eglglessink_init_egl_surface (GstEglGlesSink * eglglessink);
static void gst_eglglessink_init_egl_exts (GstEglGlesSink * eglglessink); static void gst_eglglessink_init_egl_exts (GstEglGlesSink * eglglessink);
static gboolean gst_eglglessink_setup_vbo (GstEglGlesSink * eglglessink, static gboolean gst_eglglessink_setup_vbo (GstEglGlesSink * eglglessink,
gboolean reset); gboolean reset);
static void gst_eglglessink_render_and_display (GstEglGlesSink * sink, static GstFlowReturn gst_eglglessink_render_and_display (GstEglGlesSink * sink,
GstBuffer * buf); GstBuffer * buf);
static inline gboolean got_gl_error (const char *wtf); static inline gboolean got_gl_error (const char *wtf);
@ -866,11 +866,7 @@ gst_eglglessink_expose (GstXOverlay * overlay)
/* Logic would be to get _render_and_display() to use /* Logic would be to get _render_and_display() to use
* last seen buffer to render from when NULL it's * last seen buffer to render from when NULL it's
* passed on */ * passed on */
g_mutex_lock (eglglessink->flow_lock); return gst_eglglessink_render_and_display (eglglessink, NULL);
gst_eglglessink_render_and_display (eglglessink, NULL);
g_mutex_unlock (eglglessink->flow_lock);
return;
} }
/* Checks available egl/gles extensions and chooses /* Checks available egl/gles extensions and chooses
@ -1258,7 +1254,7 @@ HANDLE_ERROR:
} }
/* Rendering and display */ /* Rendering and display */
static void static GstFlowReturn
gst_eglglessink_render_and_display (GstEglGlesSink * eglglessink, gst_eglglessink_render_and_display (GstEglGlesSink * eglglessink,
GstBuffer * buf) GstBuffer * buf)
{ {
@ -1344,12 +1340,13 @@ gst_eglglessink_render_and_display (GstEglGlesSink * eglglessink,
} }
GST_DEBUG_OBJECT (eglglessink, "Succesfully rendered 1 frame"); GST_DEBUG_OBJECT (eglglessink, "Succesfully rendered 1 frame");
return; return GST_FLOW_OK;
HANDLE_EGL_ERROR: HANDLE_EGL_ERROR:
GST_ERROR_OBJECT (eglglessink, "EGL call returned error %x", eglGetError ()); GST_ERROR_OBJECT (eglglessink, "EGL call returned error %x", eglGetError ());
HANDLE_ERROR: HANDLE_ERROR:
GST_ERROR_OBJECT (eglglessink, "Rendering disabled for this frame"); GST_ERROR_OBJECT (eglglessink, "Rendering disabled for this frame");
return GST_FLOW_ERROR;
} }
static GstFlowReturn static GstFlowReturn
@ -1376,9 +1373,7 @@ gst_eglglessink_show_frame (GstVideoSink * vsink, GstBuffer * buf)
"available"); "available");
#endif #endif
gst_eglglessink_render_and_display (eglglessink, buf); return gst_eglglessink_render_and_display (eglglessink, buf);
return GST_FLOW_OK;
} }
static gboolean static gboolean