Zebediah Figura : winegstreamer: Don't query our own source pad to convert duration.
Alexandre Julliard
julliard at winehq.org
Thu Jun 11 15:26:44 CDT 2020
Module: wine
Branch: master
Commit: 1e079a0ca40f5f67ac4ecd4a3291ce299069e608
URL: https://source.winehq.org/git/wine.git/?a=commit;h=1e079a0ca40f5f67ac4ecd4a3291ce299069e608
Author: Zebediah Figura <zfigura at codeweavers.com>
Date: Wed Jun 10 15:52:55 2020 -0500
winegstreamer: Don't query our own source pad to convert duration.
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/winegstreamer/gstdemux.c | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c
index 7c38e421f9..19d36cd233 100644
--- a/dlls/winegstreamer/gstdemux.c
+++ b/dlls/winegstreamer/gstdemux.c
@@ -1139,21 +1139,23 @@ static gboolean query_function(GstPad *pad, GstObject *parent, GstQuery *query)
{
struct gstdemux *This = gst_pad_get_element_private(pad);
GstFormat format;
- int ret;
- LONGLONG duration;
TRACE("filter %p, type %s.\n", This, GST_QUERY_TYPE_NAME(query));
switch (GST_QUERY_TYPE(query)) {
case GST_QUERY_DURATION:
- gst_query_parse_duration (query, &format, NULL);
- if (format == GST_FORMAT_PERCENT) {
- gst_query_set_duration (query, GST_FORMAT_PERCENT, GST_FORMAT_PERCENT_MAX);
+ gst_query_parse_duration(query, &format, NULL);
+ if (format == GST_FORMAT_PERCENT)
+ {
+ gst_query_set_duration(query, GST_FORMAT_PERCENT, GST_FORMAT_PERCENT_MAX);
return TRUE;
}
- ret = gst_pad_query_convert (pad, GST_FORMAT_BYTES, This->filesize, format, &duration);
- gst_query_set_duration(query, format, duration);
- return ret;
+ else if (format == GST_FORMAT_BYTES)
+ {
+ gst_query_set_duration(query, GST_FORMAT_BYTES, This->filesize);
+ return TRUE;
+ }
+ return FALSE;
case GST_QUERY_SEEKING:
gst_query_parse_seeking (query, &format, NULL, NULL, NULL);
if (format != GST_FORMAT_BYTES)
More information about the wine-cvs
mailing list