mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-16 04:54:12 +00:00
gio: don't use soon-to-be-deprecated g_cancellable_reset()
From the API documentation: "Note that it is generally not a good idea to reuse an existing cancellable for more operations after it has been cancelled once, as this function might tempt you to do. The recommended practice is to drop the reference to a cancellable after cancelling it, and let it die with the outstanding async operations. You should create a fresh cancellable for further async operations." https://bugzilla.gnome.org/show_bug.cgi?id=739132
This commit is contained in:
parent
37aa31379f
commit
39cbe25df7
2 changed files with 4 additions and 2 deletions
|
@ -191,7 +191,8 @@ gst_gio_base_sink_unlock_stop (GstBaseSink * base_sink)
|
|||
|
||||
GST_LOG_OBJECT (sink, "resetting cancellable");
|
||||
|
||||
g_cancellable_reset (sink->cancel);
|
||||
g_object_unref (sink->cancel);
|
||||
sink->cancel = g_cancellable_new ();
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -286,7 +286,8 @@ gst_gio_base_src_unlock_stop (GstBaseSrc * base_src)
|
|||
|
||||
GST_LOG_OBJECT (src, "resetting cancellable");
|
||||
|
||||
g_cancellable_reset (src->cancel);
|
||||
g_object_unref (src->cancel);
|
||||
src->cancel = g_cancellable_new ();
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue