mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
rtsp: 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
39cbe25df7
commit
853951b646
1 changed files with 7 additions and 4 deletions
|
@ -2474,10 +2474,12 @@ gst_rtsp_connection_flush (GstRTSPConnection * conn, gboolean flush)
|
|||
{
|
||||
g_return_val_if_fail (conn != NULL, GST_RTSP_EINVAL);
|
||||
|
||||
if (flush)
|
||||
if (flush) {
|
||||
g_cancellable_cancel (conn->cancellable);
|
||||
else
|
||||
g_cancellable_reset (conn->cancellable);
|
||||
} else {
|
||||
g_object_unref (conn->cancellable);
|
||||
conn->cancellable = g_cancellable_new ();
|
||||
}
|
||||
|
||||
return GST_RTSP_OK;
|
||||
}
|
||||
|
@ -2940,7 +2942,8 @@ gst_rtsp_connection_do_tunnel (GstRTSPConnection * conn,
|
|||
conn2->stream1 = NULL;
|
||||
conn2->input_stream = NULL;
|
||||
conn2->control_stream = NULL;
|
||||
g_cancellable_reset (conn2->cancellable);
|
||||
g_object_unref (conn2->cancellable);
|
||||
conn2->cancellable = NULL;
|
||||
|
||||
/* We make socket0 the write socket and socket1 the read socket. */
|
||||
conn->write_socket = conn->socket0;
|
||||
|
|
Loading…
Reference in a new issue