winegstreamer: Store the stream duration also in the wg_parser_stream structure.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2021-02-04 20:53:39 -06:00 committed by Alexandre Julliard
parent a03f7350b3
commit 42dc1e93b2
1 changed files with 4 additions and 1 deletions

View File

@ -110,6 +110,8 @@ struct wg_parser_stream
struct wg_parser_event event;
bool flushing, eos, enabled;
uint64_t duration;
};
struct parser
@ -1638,7 +1640,8 @@ static HRESULT GST_Connect(struct parser *This, IPin *pConnectPin)
struct parser_source *pin = This->sources[i];
struct wg_parser_stream *stream = pin->wg_stream;
pin->seek.llDuration = pin->seek.llStop = query_duration(stream->their_src);
stream->duration = query_duration(stream->their_src);
pin->seek.llDuration = pin->seek.llStop = stream->duration;
pin->seek.llCurrent = 0;
while (!stream->caps && !parser->error)
pthread_cond_wait(&parser->init_cond, &parser->mutex);