mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-28 19:20:35 +00:00
utils: return immediately for -1 conversion
When we are asked to convert -1, we can return immediately with a -1 return value.
This commit is contained in:
parent
e84d563033
commit
a0cb088284
1 changed files with 2 additions and 2 deletions
|
@ -2268,7 +2268,7 @@ gst_element_query_convert (GstElement * element, GstFormat src_format,
|
|||
g_return_val_if_fail (dest_format != NULL, FALSE);
|
||||
g_return_val_if_fail (dest_val != NULL, FALSE);
|
||||
|
||||
if (*dest_format == src_format) {
|
||||
if (*dest_format == src_format || src_val == -1) {
|
||||
*dest_val = src_val;
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -3069,7 +3069,7 @@ gst_pad_query_convert (GstPad * pad, GstFormat src_format, gint64 src_val,
|
|||
g_return_val_if_fail (dest_format != NULL, FALSE);
|
||||
g_return_val_if_fail (dest_val != NULL, FALSE);
|
||||
|
||||
if (*dest_format == src_format) {
|
||||
if (*dest_format == src_format || src_val == -1) {
|
||||
*dest_val = src_val;
|
||||
return TRUE;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue