summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReynaldo H. Verdejo Pinochet <reynaldo@collabora.com>2012-09-06 21:43:03 -0300
committerReynaldo H. Verdejo Pinochet <reynaldo@collabora.com>2012-09-06 21:43:03 -0300
commit08cbca59aacb79a7b85f088f398c60773d950406 (patch)
treecf21c17802e5d197d07783f187d29ab76256b5a2
parent44b722fed257f0ee9be7195e04565dc3d1cb2b72 (diff)
Move EGL display init to begining of _start()
-rw-r--r--sys/android/gstvidroidsink.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/sys/android/gstvidroidsink.c b/sys/android/gstvidroidsink.c
index 57346d6c2..c1ad8d39e 100644
--- a/sys/android/gstvidroidsink.c
+++ b/sys/android/gstvidroidsink.c
@@ -661,10 +661,18 @@ gst_vidroidsink_start (GstBaseSink * sink)
GstViDroidSink *vidroidsink = GST_VIDROIDSINK (sink);
GstViDroidImageFmt *format;
- platform_wrapper_init ();
vidroidsink->flow_lock = g_mutex_new ();
g_mutex_lock (vidroidsink->flow_lock);
+ ret = gst_vidroidsink_init_egl_display (vidroidsink);
+
+ if (!ret) {
+ GST_ERROR_OBJECT (vidroidsink, "Couldn't init EGL display. Bailing out");
+ goto HANDLE_ERROR;
+ }
+
+ platform_wrapper_init ();
+
/* Init supported caps list (Right now we just harcode the only one we support)
* XXX: Not sure this is the right place to do it.
*/
@@ -713,13 +721,6 @@ gst_vidroidsink_start (GstBaseSink * sink)
goto HANDLE_ERROR;
}
- ret = gst_vidroidsink_init_egl_display (vidroidsink);
-
- if (!ret) {
- GST_ERROR_OBJECT (vidroidsink, "Couldn't init EGL display. Bailing out");
- goto HANDLE_ERROR;
- }
-
g_mutex_unlock (vidroidsink->flow_lock);
return TRUE;