mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-01 21:18:52 +00:00
basesrc: Only set duration/position query values in case of query success
Currently, the query values are being set even if the query itself was determined to have failed. Fix this to ensure the values are only set in case of a query success. https://bugzilla.gnome.org/show_bug.cgi?id=760479
This commit is contained in:
parent
30741e0206
commit
91496281eb
1 changed files with 7 additions and 2 deletions
|
@ -1038,7 +1038,9 @@ gst_base_src_default_query (GstBaseSrc * src, GstQuery * query)
|
|||
} else
|
||||
res = TRUE;
|
||||
|
||||
if (res)
|
||||
gst_query_set_position (query, format, position);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1091,7 +1093,10 @@ gst_base_src_default_query (GstBaseSrc * src, GstQuery * query)
|
|||
* means that we cannot report the duration at all. */
|
||||
res = TRUE;
|
||||
}
|
||||
|
||||
if (res)
|
||||
gst_query_set_duration (query, format, duration);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue