summaryrefslogtreecommitdiffstats
path: root/gst-libs
diff options
context:
space:
mode:
authorJulien Moutte <julien@moutte.net>2003-07-12 09:18:31 +0000
committerJulien Moutte <julien@moutte.net>2003-07-12 09:18:31 +0000
commitb6518dc7d8461be334ea2b8588c2d880c71d5213 (patch)
tree74191e75bce56271f612e595ef8164f26908bf13 /gst-libs
parent41c1c8f56aab9330a1243319a959549f44cac55a (diff)
downloadgst-plugins-bad-b6518dc7d8461be334ea2b8588c2d880c71d5213.tar.gz
gst-plugins-bad-b6518dc7d8461be334ea2b8588c2d880c71d5213.tar.bz2
gst-plugins-bad-b6518dc7d8461be334ea2b8588c2d880c71d5213.zip
fixing buggy error handling
Original commit message from CVS: fixing buggy error handling
Diffstat (limited to 'gst-libs')
-rw-r--r--gst-libs/gst/play/play.old.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/gst-libs/gst/play/play.old.c b/gst-libs/gst/play/play.old.c
index 69382c0c..bd73df79 100644
--- a/gst-libs/gst/play/play.old.c
+++ b/gst-libs/gst/play/play.old.c
@@ -370,6 +370,11 @@ gst_play_idle_signal (GstPlay * play)
gst_object_unref (signal->signal_data.info.object);
break;
case PIPELINE_ERROR:
+
+ if (gst_element_get_state (play->pipeline) == GST_STATE_PLAYING)
+ if (gst_element_set_state (play->pipeline, GST_STATE_READY) !=
+ GST_STATE_SUCCESS)
+ g_warning ("PIPELINE_ERROR: set to READY failed");
g_signal_emit (G_OBJECT (play), gst_play_signals[PIPELINE_ERROR], 0,
signal->signal_data.error.element,
signal->signal_data.error.error);
@@ -459,9 +464,6 @@ callback_pipeline_error (GstElement * object,
g_async_queue_push (play->signal_queue, signal);
- if (GST_IS_ELEMENT (play->pipeline))
- gst_element_set_state (play->pipeline, GST_STATE_READY);
-
play->idle_add_func ((GSourceFunc) gst_play_idle_signal, play);
}
@@ -497,6 +499,8 @@ callback_pipeline_state_change (GstElement * element,
g_return_if_fail (GST_IS_PLAY (play));
g_return_if_fail (element == play->pipeline);
+ /*g_print ("got state change %s to %s\n", gst_element_state_get_name (old), gst_element_state_get_name (state)); */
+
/* do additional stuff depending on state */
if (GST_IS_PIPELINE (play->pipeline))
{