mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-26 00:58:12 +00:00
uridownloader: Fix race condition between EOS handling and downloading a range
https://bugzilla.gnome.org/show_bug.cgi?id=723134
This commit is contained in:
parent
2ae5adfd53
commit
06dd8839f4
1 changed files with 3 additions and 1 deletions
|
@ -210,6 +210,7 @@ gst_uri_downloader_bus_handler (GstBus * bus,
|
|||
GST_DEBUG_OBJECT (downloader, "Stopping download");
|
||||
g_object_unref (downloader->priv->download);
|
||||
downloader->priv->download = NULL;
|
||||
downloader->priv->cancelled = TRUE;
|
||||
g_cond_signal (&downloader->priv->cond);
|
||||
}
|
||||
GST_OBJECT_UNLOCK (downloader);
|
||||
|
@ -409,7 +410,8 @@ gst_uri_downloader_fetch_uri_with_range (GstUriDownloader * downloader,
|
|||
* - the download was canceled
|
||||
*/
|
||||
GST_DEBUG_OBJECT (downloader, "Waiting to fetch the URI %s", uri);
|
||||
g_cond_wait (&downloader->priv->cond, GST_OBJECT_GET_LOCK (downloader));
|
||||
while (!downloader->priv->cancelled && !downloader->priv->download->completed)
|
||||
g_cond_wait (&downloader->priv->cond, GST_OBJECT_GET_LOCK (downloader));
|
||||
|
||||
if (downloader->priv->cancelled) {
|
||||
if (downloader->priv->download) {
|
||||
|
|
Loading…
Reference in a new issue