mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-09 08:55:33 +00:00
tcpclientsrc, tcpserversrc: don't try to get stats from NULL socket
Fixes criticals during gst-inspect. Wasn't an issue before because the entire stats gathering code path was inactive. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8211>
This commit is contained in:
parent
b4bef7fd35
commit
64970e721f
2 changed files with 4 additions and 2 deletions
|
@ -566,7 +566,8 @@ gst_tcp_client_src_get_stats (GstTCPClientSrc * src)
|
|||
s = gst_structure_new ("GstTCPClientSrcStats",
|
||||
"bytes-received", G_TYPE_UINT64, src->bytes_received, NULL);
|
||||
|
||||
gst_tcp_stats_from_socket (s, src->socket);
|
||||
if (src->socket != NULL)
|
||||
gst_tcp_stats_from_socket (s, src->socket);
|
||||
|
||||
return s;
|
||||
}
|
||||
|
|
|
@ -596,7 +596,8 @@ gst_tcp_server_src_get_stats (GstTCPServerSrc * src)
|
|||
s = gst_structure_new ("GstTCPServerSrcStats",
|
||||
"bytes-received", G_TYPE_UINT64, src->bytes_received, NULL);
|
||||
|
||||
gst_tcp_stats_from_socket (s, src->client_socket);
|
||||
if (src->client_socket != NULL)
|
||||
gst_tcp_stats_from_socket (s, src->client_socket);
|
||||
|
||||
return s;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue