Make slightly more responsive.
This commit is contained in:
parent
8cf6d04cd2
commit
b434016602
1 changed files with 1 additions and 0 deletions
|
@ -327,6 +327,7 @@ GstreamerPlayer :: preload(const std::string fileUrl)
|
||||||
|
|
||||||
gint64 position = 0LL;
|
gint64 position = 0LL;
|
||||||
while (position == 0LL && gst_bin_iterate(GST_BIN(pipe))) {
|
while (position == 0LL && gst_bin_iterate(GST_BIN(pipe))) {
|
||||||
|
while(g_main_context_pending(NULL)) g_main_context_iteration(NULL,FALSE);
|
||||||
GstFormat format = GST_FORMAT_DEFAULT;
|
GstFormat format = GST_FORMAT_DEFAULT;
|
||||||
gst_element_query(fakesink, GST_QUERY_POSITION, &format, &position);
|
gst_element_query(fakesink, GST_QUERY_POSITION, &format, &position);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue