Commit ddf3b93a authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

winegstreamer: Don't try to convert duration from byte length.

This effectively reverts 613446d0. Duration and convert queries, in general, appear to be handled by the first upstream element that knows how. If two different elements respond to each query, we may treat the byte duration of the whole file as if it were the duration of a single stream, or treat an undecoded byte duration as if it were a decoded byte duration. The aforementioned commit was written in order to ensure that we receive a valid duration for test.mp3 in quartz_test.exe, and is obviated by the previous patches which retry duration queries until successful (or EOS). Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51126Signed-off-by: 's avatarZebediah Figura <zfigura@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent e0a28110
......@@ -1525,7 +1525,7 @@ static HRESULT CDECL wg_parser_connect(struct wg_parser *parser, uint64_t file_s
for (i = 0; i < parser->stream_count; ++i)
{
struct wg_parser_stream *stream = parser->streams[i];
gint64 duration, byte_length;
gint64 duration;
while (!stream->has_caps && !parser->error)
pthread_cond_wait(&parser->init_cond, &parser->mutex);
......@@ -1567,18 +1567,6 @@ static HRESULT CDECL wg_parser_connect(struct wg_parser *parser, uint64_t file_s
break;
}
GST_INFO("Failed to query time duration; trying to convert from byte length.\n");
/* To accurately get a duration for the stream, we want to only
* consider the length of that stream. Hence, query for the pad
* duration, instead of using the file duration. */
if (gst_pad_query_duration(stream->their_src, GST_FORMAT_BYTES, &byte_length)
&& gst_pad_query_convert(stream->their_src, GST_FORMAT_BYTES, byte_length,
GST_FORMAT_TIME, &duration))
{
stream->duration = duration / 100;
break;
}
if (stream->eos)
{
stream->duration = 0;
......
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