mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
baseparse: make estimating the position in query handler actually work
No point estimating if we don't set the result afterwards.
This commit is contained in:
parent
f94701261a
commit
0ac0b70c15
1 changed files with 3 additions and 3 deletions
|
@ -3163,14 +3163,14 @@ gst_base_parse_query (GstPad * pad, GstQuery * query)
|
||||||
res = TRUE;
|
res = TRUE;
|
||||||
}
|
}
|
||||||
GST_OBJECT_UNLOCK (parse);
|
GST_OBJECT_UNLOCK (parse);
|
||||||
if (res)
|
if (!res) {
|
||||||
gst_query_set_position (query, format, dest_value);
|
|
||||||
else {
|
|
||||||
/* no precise result, upstream no idea either, then best estimate */
|
/* no precise result, upstream no idea either, then best estimate */
|
||||||
/* priv->offset is updated in both PUSH/PULL modes */
|
/* priv->offset is updated in both PUSH/PULL modes */
|
||||||
res = gst_base_parse_convert (parse,
|
res = gst_base_parse_convert (parse,
|
||||||
GST_FORMAT_BYTES, parse->priv->offset, format, &dest_value);
|
GST_FORMAT_BYTES, parse->priv->offset, format, &dest_value);
|
||||||
}
|
}
|
||||||
|
if (res)
|
||||||
|
gst_query_set_position (query, format, dest_value);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue