summaryrefslogtreecommitdiffstats
path: root/gst-libs
diff options
context:
space:
mode:
Diffstat (limited to 'gst-libs')
-rw-r--r--gst-libs/gst/play/play.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/gst-libs/gst/play/play.c b/gst-libs/gst/play/play.c
index a7a04a05..ba100fb3 100644
--- a/gst-libs/gst/play/play.c
+++ b/gst-libs/gst/play/play.c
@@ -671,6 +671,10 @@ gst_play_seek_to_time (GstPlay * play, gint64 time_nanos)
GST_IS_ELEMENT (audio_sink_element)) {
gboolean s = FALSE;
+ /* We block the tick signal while seeking */
+ if (play->priv->tick_id)
+ g_signal_handler_block (G_OBJECT (play), play->priv->tick_id);
+
s = gst_element_seek (video_seek_element, GST_FORMAT_TIME |
GST_SEEK_METHOD_SET | GST_SEEK_FLAG_FLUSH,
time_nanos);
@@ -680,6 +684,10 @@ gst_play_seek_to_time (GstPlay * play, gint64 time_nanos)
time_nanos);
}
+ /* We unblock the tick signal after seeking */
+ if (play->priv->tick_id)
+ g_signal_handler_unblock (G_OBJECT (play), play->priv->tick_id);
+
if (s) {
GstFormat format = GST_FORMAT_TIME;
gboolean q = FALSE;
@@ -1125,7 +1133,7 @@ gst_play_new (GError **error)
{
GstPlay *play = g_object_new (GST_TYPE_PLAY, NULL);
- if (play->priv->error)
+ if ( (error) && (play->priv->error) )
{
*error = play->priv->error;
play->priv->error = NULL;