Commit 494039d0 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

winegstreamer: Return void from wg_parser_stream_seek().

We do not expect this to fail. Signed-off-by: 's avatarZebediah Figura <zfigura@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 84b870bb
......@@ -1233,7 +1233,6 @@ static HRESULT WINAPI GST_Seeking_SetPositions(IMediaSeeking *iface,
{
struct parser_source *pin = impl_from_IMediaSeeking(iface);
struct parser *filter = impl_from_strmbase_filter(pin->pin.pin.filter);
HRESULT hr = S_OK;
int i;
TRACE("pin %p, current %s, current_flags %#x, stop %s, stop_flags %#x.\n",
......@@ -1270,13 +1269,8 @@ static HRESULT WINAPI GST_Seeking_SetPositions(IMediaSeeking *iface,
SourceSeekingImpl_SetPositions(iface, current, current_flags, stop, stop_flags);
if (!unix_funcs->wg_parser_stream_seek(pin->wg_stream, pin->seek.dRate,
pin->seek.llCurrent, pin->seek.llStop, current_flags, stop_flags))
{
ERR("Failed to seek (current %s, stop %s).\n",
debugstr_time(pin->seek.llCurrent), debugstr_time(pin->seek.llStop));
hr = E_FAIL;
}
unix_funcs->wg_parser_stream_seek(pin->wg_stream, pin->seek.dRate,
pin->seek.llCurrent, pin->seek.llStop, current_flags, stop_flags);
if (!(current_flags & AM_SEEKING_NoFlush))
{
......@@ -1299,7 +1293,7 @@ static HRESULT WINAPI GST_Seeking_SetPositions(IMediaSeeking *iface,
LeaveCriticalSection(&pin->flushing_cs);
}
return hr;
return S_OK;
}
static const IMediaSeekingVtbl GST_Seeking_Vtbl =
......
......@@ -158,7 +158,7 @@ struct unix_funcs
/* Returns the duration in 100-nanosecond units. */
uint64_t (CDECL *wg_parser_stream_get_duration)(struct wg_parser_stream *stream);
/* start_pos and stop_pos are in 100-nanosecond units. */
bool (CDECL *wg_parser_stream_seek)(struct wg_parser_stream *stream, double rate,
void (CDECL *wg_parser_stream_seek)(struct wg_parser_stream *stream, double rate,
uint64_t start_pos, uint64_t stop_pos, DWORD start_flags, DWORD stop_flags);
};
......
......@@ -686,7 +686,7 @@ static uint64_t CDECL wg_parser_stream_get_duration(struct wg_parser_stream *str
return stream->duration;
}
static bool CDECL wg_parser_stream_seek(struct wg_parser_stream *stream, double rate,
static void CDECL wg_parser_stream_seek(struct wg_parser_stream *stream, double rate,
uint64_t start_pos, uint64_t stop_pos, DWORD start_flags, DWORD stop_flags)
{
GstSeekType start_type = GST_SEEK_TYPE_SET, stop_type = GST_SEEK_TYPE_SET;
......@@ -704,8 +704,9 @@ static bool CDECL wg_parser_stream_seek(struct wg_parser_stream *stream, double
if ((stop_flags & AM_SEEKING_PositioningBitsMask) == AM_SEEKING_NoPositioning)
stop_type = GST_SEEK_TYPE_NONE;
return gst_pad_push_event(stream->my_sink, gst_event_new_seek(rate,
GST_FORMAT_TIME, flags, start_type, start_pos * 100, stop_type, stop_pos * 100));
if (!gst_pad_push_event(stream->my_sink, gst_event_new_seek(rate, GST_FORMAT_TIME,
flags, start_type, start_pos * 100, stop_type, stop_pos * 100)))
GST_ERROR("Failed to seek.\n");
}
static void CDECL wg_parser_stream_notify_qos(struct wg_parser_stream *stream,
......
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