mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
rtpsession: Fix twcc stats structure leaks
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8073>
This commit is contained in:
parent
4d2e27dcf3
commit
eb07c4e6b3
3 changed files with 11 additions and 2 deletions
|
@ -3007,6 +3007,8 @@ gst_rtp_session_notify_twcc (RTPSession * sess,
|
|||
event = gst_event_new_custom (GST_EVENT_CUSTOM_UPSTREAM, twcc_packets);
|
||||
gst_pad_push_event (send_rtp_sink, event);
|
||||
gst_object_unref (send_rtp_sink);
|
||||
} else {
|
||||
gst_structure_free (twcc_packets);
|
||||
}
|
||||
|
||||
g_object_notify (G_OBJECT (rtpsession), "twcc-stats");
|
||||
|
|
|
@ -3002,8 +3002,12 @@ rtp_session_process_twcc (RTPSession * sess, guint32 sender_ssrc,
|
|||
|
||||
RTP_SESSION_UNLOCK (sess);
|
||||
if (sess->callbacks.notify_twcc)
|
||||
sess->callbacks.notify_twcc (sess, twcc_packets_s, twcc_stats_s,
|
||||
sess->notify_twcc_user_data);
|
||||
sess->callbacks.notify_twcc (sess, g_steal_pointer (&twcc_packets_s),
|
||||
g_steal_pointer (&twcc_stats_s), sess->notify_twcc_user_data);
|
||||
else {
|
||||
gst_structure_free (twcc_packets_s);
|
||||
gst_structure_free (twcc_stats_s);
|
||||
}
|
||||
RTP_SESSION_LOCK (sess);
|
||||
}
|
||||
|
||||
|
|
|
@ -159,6 +159,9 @@ typedef void (*RTPSessionNotifyNACK) (RTPSession *sess,
|
|||
|
||||
/**
|
||||
* RTPSessionNotifyTWCC:
|
||||
* @sess: an #RTPSession
|
||||
* @twcc_packets: (transfer full): TWCC packets #GstStructure
|
||||
* @twcc_stats: (transfer full): TWCC stats #GstStructure
|
||||
* @user_data: user data specified when registering
|
||||
*
|
||||
* Notifies of Transport-wide congestion control packets and stats.
|
||||
|
|
Loading…
Reference in a new issue