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
@ -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…
x
Reference in New Issue
Block a user