mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-09 08:55:33 +00:00
tools: gst-play: fix seeking issue
For positive seeking segment.stop value will be -1, when we change rate to -1, then the stop value will be udpated with the current position. And then again if we change rate to 1, the segment.stop value does not get updated and remains as position where we last changed rate to -1. Hence playback stops at that point. In case of positive rates, call gst_element_new_seek with correct values https://bugzilla.gnome.org/show_bug.cgi?id=751213
This commit is contained in:
parent
757cd8ffce
commit
eec791a37f
1 changed files with 3 additions and 3 deletions
|
@ -801,11 +801,11 @@ play_do_seek (GstPlay * play, gint64 pos, gdouble rate, GstPlayTrickMode mode)
|
|||
break;
|
||||
}
|
||||
|
||||
if (rate > 0)
|
||||
if (rate >= 0)
|
||||
seek = gst_event_new_seek (rate, GST_FORMAT_TIME,
|
||||
seek_flags | GST_SEEK_FLAG_KEY_UNIT,
|
||||
seek_flags | GST_SEEK_FLAG_ACCURATE,
|
||||
/* start */ GST_SEEK_TYPE_SET, pos,
|
||||
/* stop */ GST_SEEK_TYPE_NONE, 0);
|
||||
/* stop */ GST_SEEK_TYPE_SET, GST_CLOCK_TIME_NONE);
|
||||
else
|
||||
seek = gst_event_new_seek (rate, GST_FORMAT_TIME,
|
||||
seek_flags | GST_SEEK_FLAG_ACCURATE,
|
||||
|
|
Loading…
Reference in a new issue