[totem] backend: Fix regression in open() for non-capture
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem] backend: Fix regression in open() for non-capture
- Date: Tue, 5 Apr 2011 18:30:57 +0000 (UTC)
commit 785801a67b0da5360781d82a6af5179b10e4b3f2
Author: Bastien Nocera <hadess hadess net>
Date: Tue Apr 5 10:59:24 2011 +0100
backend: Fix regression in open() for non-capture
Don't wait for state change for non-capture. Duh!
src/backend/bacon-video-widget-gst-0.10.c | 22 +++++++++++++++-------
1 files changed, 15 insertions(+), 7 deletions(-)
---
diff --git a/src/backend/bacon-video-widget-gst-0.10.c b/src/backend/bacon-video-widget-gst-0.10.c
index dd14710..4af5243 100644
--- a/src/backend/bacon-video-widget-gst-0.10.c
+++ b/src/backend/bacon-video-widget-gst-0.10.c
@@ -2217,7 +2217,7 @@ bvw_query_timeout (BaconVideoWidget *bvw)
{
GstFormat fmt = GST_FORMAT_TIME;
gint64 pos = -1, len = -1;
-
+
/* check length/pos of stream */
if (gst_element_query_duration (bvw->priv->play, &fmt, &len)) {
if (len != -1 && fmt == GST_FORMAT_TIME)
@@ -3557,12 +3557,20 @@ bacon_video_widget_open (BaconVideoWidget * bvw,
gst_element_set_state (bvw->priv->play, GST_STATE_PAUSED);
- /* used as thumbnailer or metadata extractor for properties dialog. In
- * this case, wait for any state change to really finish and process any
- * pending tag messages, so that the information is available right away */
- GST_DEBUG ("waiting for state changed to PAUSED to complete");
- ret = poll_for_state_change_full (bvw, bvw->priv->play,
- GST_STATE_PAUSED, &err_msg, -1);
+ if (bvw->priv->use_type == BVW_USE_TYPE_CAPTURE)
+ {
+ /* used as thumbnailer or metadata extractor for properties dialog. In
+ * this case, wait for any state change to really finish and process any
+ * pending tag messages, so that the information is available right away */
+ GST_DEBUG ("waiting for state changed to PAUSED to complete");
+ ret = poll_for_state_change_full (bvw, bvw->priv->play,
+ GST_STATE_PAUSED, &err_msg, -1);
+ }
+ else
+ {
+ GST_DEBUG ("normal playback, handling all errors asynchroneously");
+ ret = TRUE;
+ }
if (ret) {
g_signal_emit (bvw, bvw_signals[SIGNAL_CHANNELS_CHANGE], 0);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]