From f688d4d8a769f064b500014d39a820653a48b9e8 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 9 Oct 2012 15:31:19 +0200 Subject: [PATCH] basesrc: retrieve the result from start_complete gst_base_src_start_complete() can fail when the thread could not be started, for example. Make sure it causes the state change to fail by retrieving the result from _start_complete(). --- libs/gst/base/gstbasesrc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libs/gst/base/gstbasesrc.c b/libs/gst/base/gstbasesrc.c index fef9b25..679a33d 100644 --- a/libs/gst/base/gstbasesrc.c +++ b/libs/gst/base/gstbasesrc.c @@ -3115,8 +3115,12 @@ gst_base_src_start (GstBaseSrc * basesrc) if (!result) goto could_not_start; - if (!gst_base_src_is_async (basesrc)) + if (!gst_base_src_is_async (basesrc)) { gst_base_src_start_complete (basesrc, GST_FLOW_OK); + /* not really waiting here, we call this to get the result + * from the start_complete call */ + result = gst_base_src_start_wait (basesrc) == GST_FLOW_OK; + } return result; -- 2.7.4