Commit ced2b4c6 authored by Alfred Agrell's avatar Alfred Agrell Committed by Alexandre Julliard

winegstreamer: Seek to end of stream instead of to stream duration.

parent 2c9f6466
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment