diff options
author | Askar Safin <safinaskar@mail.ru> | 2019-09-04 12:54:17 +0300 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2019-09-06 01:05:14 +0100 |
commit | 21ad51f48c651350b543d74e6373773bad54fd93 (patch) | |
tree | d4f93214dd8c3c1ccdcc39c2ede7eaa4205cfde0 /gst-libs | |
parent | df1140c3de904174d60cac10be856fa654014f53 (diff) | |
download | gstreamer-plugins-bad-21ad51f48c651350b543d74e6373773bad54fd93.tar.gz |
gst-player: fix bug with changing playback direction
Fix gst_event_new_seek call in gst-libs/gst/player/gstplayer.c
If rate >= 0.0, then previous code doesn't set end of segment. So, the end of segment
will be in place where previous seek put it. This is not neccesary end of media file
(in case of reverse playback). So if we play video backward for some time and then
switched to forward playing, we will get EOS somewhere in the middle of media file.
This commit always sets end of segment, thus fixing this bug
Diffstat (limited to 'gst-libs')
-rw-r--r-- | gst-libs/gst/player/gstplayer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gst-libs/gst/player/gstplayer.c b/gst-libs/gst/player/gstplayer.c index af9278aa7..259d11e5f 100644 --- a/gst-libs/gst/player/gstplayer.c +++ b/gst-libs/gst/player/gstplayer.c @@ -3357,7 +3357,7 @@ gst_player_seek_internal_locked (GstPlayer * self) if (rate >= 0.0) { s_event = gst_event_new_seek (rate, GST_FORMAT_TIME, flags, - GST_SEEK_TYPE_SET, position, GST_SEEK_TYPE_NONE, GST_CLOCK_TIME_NONE); + GST_SEEK_TYPE_SET, position, GST_SEEK_TYPE_SET, GST_CLOCK_TIME_NONE); } else { s_event = gst_event_new_seek (rate, GST_FORMAT_TIME, flags, GST_SEEK_TYPE_SET, G_GINT64_CONSTANT (0), GST_SEEK_TYPE_SET, position); |