Module: wine Branch: master Commit: ced2b4c672bf1bd0e1ab0f6f3412df7c5edaf8c9 URL: https://gitlab.winehq.org/wine/wine/-/commit/ced2b4c672bf1bd0e1ab0f6f3412df7...
Author: Alfred Agrell floating@muncher.se Date: Fri Oct 20 02:04:24 2023 +0200
winegstreamer: Seek to end of stream instead of to stream duration.
---
dlls/winegstreamer/wg_parser.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c index 70c25d8c0a0..e097325a419 100644 --- a/dlls/winegstreamer/wg_parser.c +++ b/dlls/winegstreamer/wg_parser.c @@ -436,8 +436,11 @@ static NTSTATUS wg_parser_stream_seek(void *args) const struct wg_parser_stream_seek_params *params = args; DWORD start_flags = params->start_flags; DWORD stop_flags = params->stop_flags; + const struct wg_parser_stream *stream; GstSeekFlags flags = 0;
+ stream = get_stream(params->stream); + if (start_flags & AM_SEEKING_SeekToKeyFrame) flags |= GST_SEEK_FLAG_KEY_UNIT; if (start_flags & AM_SEEKING_Segment) @@ -450,8 +453,9 @@ static NTSTATUS wg_parser_stream_seek(void *args) if ((stop_flags & AM_SEEKING_PositioningBitsMask) == AM_SEEKING_NoPositioning) stop_type = GST_SEEK_TYPE_NONE;
- if (!push_event(get_stream(params->stream)->my_sink, gst_event_new_seek(params->rate, GST_FORMAT_TIME, - flags, start_type, params->start_pos * 100, stop_type, params->stop_pos * 100))) + if (!push_event(stream->my_sink, gst_event_new_seek(params->rate, GST_FORMAT_TIME, + flags, start_type, params->start_pos * 100, stop_type, + params->stop_pos == stream->duration ? -1 : params->stop_pos * 100))) GST_ERROR("Failed to seek.\n");
return S_OK;