[totem] backend: Don't throw EOS when seeking past the end
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem] backend: Don't throw EOS when seeking past the end
- Date: Sun, 15 Jul 2012 00:04:56 +0000 (UTC)
commit 5b1d9bab325d65f1a8a35244424523b9ceb17194
Author: Bastien Nocera <hadess hadess net>
Date: Sun Jul 15 01:03:11 2012 +0100
backend: Don't throw EOS when seeking past the end
If we're already playing, seeking to the end will cause an EOS anyway.
And if we're paused, then one can carry on seeking around (though
mostly back I'm guessing).
https://bugzilla.gnome.org/show_bug.cgi?id=667746
src/backend/bacon-video-widget.c | 10 ++--------
1 files changed, 2 insertions(+), 8 deletions(-)
---
diff --git a/src/backend/bacon-video-widget.c b/src/backend/bacon-video-widget.c
index 7eb7354..1bd9b9e 100644
--- a/src/backend/bacon-video-widget.c
+++ b/src/backend/bacon-video-widget.c
@@ -3638,14 +3638,8 @@ bacon_video_widget_seek_time (BaconVideoWidget *bvw, gint64 _time, gboolean accu
GST_LOG ("Seeking to %" GST_TIME_FORMAT, GST_TIME_ARGS (_time * GST_MSECOND));
- if (_time > bvw->priv->stream_length
- && bvw->priv->stream_length > 0
- && !g_str_has_prefix (bvw->priv->mrl, "dvd:")
- && !g_str_has_prefix (bvw->priv->mrl, "vcd:")) {
- if (bvw->priv->eos_id == 0)
- bvw->priv->eos_id = g_idle_add (bvw_signal_eos_delayed, bvw);
- return TRUE;
- }
+ /* Don't say we'll seek past the end */
+ _time = MIN (_time, bvw->priv->stream_length);
/* Emit a time tick of where we are going, we are paused */
got_time_tick (bvw->priv->play, _time * GST_MSECOND, bvw);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]