mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-30 07:42:23 +02:00
API: snap at nearest keyframe when doing fast seek
GStreamer needs to perform a seek when changing playback rate. Snapping at next keyframe causes viewer to lose few seconds of video when changing playback speed (and ugly fast forward effect when dragging speed slider). Prevent all those issues by seeking to the nearest keyframe instead.
This commit is contained in:
@@ -3222,7 +3222,7 @@ gst_clapper_seek_internal_locked (GstClapper * self)
|
||||
flags |= GST_SEEK_FLAG_ACCURATE;
|
||||
break;
|
||||
case GST_CLAPPER_SEEK_MODE_FAST:
|
||||
flags |= GST_SEEK_FLAG_KEY_UNIT | GST_SEEK_FLAG_SNAP_AFTER;
|
||||
flags |= GST_SEEK_FLAG_KEY_UNIT | GST_SEEK_FLAG_SNAP_NEAREST;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
Reference in New Issue
Block a user