From e15d7f2c1b67bcc3c9ee1ea6b70735d3122954cd Mon Sep 17 00:00:00 2001 From: englebass Date: Wed, 10 Sep 2008 04:29:52 +0000 Subject: [PATCH] Keep guard against seeking to the same position, but initialize to -1. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/emotion@35913 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/modules/gstreamer/emotion_gstreamer.c | 3 +++ src/modules/gstreamer/emotion_gstreamer.h | 1 + 2 files changed, 4 insertions(+) diff --git a/src/modules/gstreamer/emotion_gstreamer.c b/src/modules/gstreamer/emotion_gstreamer.c index 0b89121..c505377 100644 --- a/src/modules/gstreamer/emotion_gstreamer.c +++ b/src/modules/gstreamer/emotion_gstreamer.c @@ -266,6 +266,7 @@ em_init(Evas_Object *obj, ev->video_sink_nbr = 0; ev->audio_sink_nbr = 0; ev->vis = EMOTION_VIS_GOOM; + ev->seek_to_pos = -1; /* Create the file descriptors */ if (pipe(fds) == 0) @@ -557,6 +558,7 @@ em_pos_set(void *video, Emotion_Audio_Sink *asink; ev = (Emotion_Gstreamer_Video *)video; + if (ev->seek_to_pos == pos) return; vsink = (Emotion_Video_Sink *)ecore_list_index_goto(ev->video_sinks, ev->video_sink_nbr); asink = (Emotion_Audio_Sink *)ecore_list_index_goto(ev->video_sinks, ev->audio_sink_nbr); @@ -579,6 +581,7 @@ em_pos_set(void *video, (gint64)(pos * (double)GST_SECOND), GST_SEEK_TYPE_NONE, -1); } + ev->seek_to_pos = pos; } static void diff --git a/src/modules/gstreamer/emotion_gstreamer.h b/src/modules/gstreamer/emotion_gstreamer.h index 66d5352..b335604 100644 --- a/src/modules/gstreamer/emotion_gstreamer.h +++ b/src/modules/gstreamer/emotion_gstreamer.h @@ -83,6 +83,7 @@ struct _Emotion_Gstreamer_Video volatile int seek_to; volatile int get_poslen; + volatile double seek_to_pos; int fd_ev_read; int fd_ev_write; -- 2.7.4