mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-23 07:38:16 +00:00
rtmp2: Only grab stats on close when connection exists
If the connection attempt failed, self->connection is NULL.
This commit is contained in:
parent
3e2d86ea18
commit
e83888302d
2 changed files with 6 additions and 2 deletions
|
@ -911,7 +911,9 @@ gst_rtmp2_sink_task_func (gpointer user_data)
|
|||
g_main_loop_run (loop);
|
||||
g_mutex_lock (&self->lock);
|
||||
|
||||
self->stats = gst_rtmp_connection_get_stats (self->connection);
|
||||
if (self->connection) {
|
||||
self->stats = gst_rtmp_connection_get_stats (self->connection);
|
||||
}
|
||||
|
||||
g_clear_pointer (&self->loop, g_main_loop_unref);
|
||||
g_clear_pointer (&self->connection, gst_rtmp_connection_close_and_unref);
|
||||
|
|
|
@ -646,7 +646,9 @@ gst_rtmp2_src_task_func (gpointer user_data)
|
|||
g_main_loop_run (loop);
|
||||
g_mutex_lock (&self->lock);
|
||||
|
||||
self->stats = gst_rtmp_connection_get_stats (self->connection);
|
||||
if (self->connection) {
|
||||
self->stats = gst_rtmp_connection_get_stats (self->connection);
|
||||
}
|
||||
|
||||
g_clear_pointer (&self->loop, g_main_loop_unref);
|
||||
g_clear_pointer (&self->connection, gst_rtmp_connection_close_and_unref);
|
||||
|
|
Loading…
Reference in a new issue