mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 19:49:50 +00:00
winegstreamer: Don't try to convert duration from byte length.
This effectively reverts 613446d018
.
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=51126
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
e0a281102b
commit
ddf3b93ac1
1 changed files with 1 additions and 13 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue