mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
rtpulpfecdec: fix buffer leak when packet is recovered from storage
Exposed by rtpulpfecdec_recovered_from_storage test.
This commit is contained in:
parent
a2d01b3a8b
commit
f9b49aef09
1 changed files with 4 additions and 1 deletions
|
@ -134,7 +134,7 @@ gst_rtp_ulpfec_dec_start (GstRtpUlpFecDec * self, GstBufferList * buflist,
|
||||||
GST_LOG_RTP_PACKET (self, "rtp header (incoming)", &info->rtp);
|
GST_LOG_RTP_PACKET (self, "rtp header (incoming)", &info->rtp);
|
||||||
|
|
||||||
if (lost_seq == gst_rtp_buffer_get_seq (&info->rtp)) {
|
if (lost_seq == gst_rtp_buffer_get_seq (&info->rtp)) {
|
||||||
GST_DEBUG_OBJECT (self, "Received lost packet from from the storage");
|
GST_DEBUG_OBJECT (self, "Received lost packet from the storage");
|
||||||
g_list_free (self->info_media);
|
g_list_free (self->info_media);
|
||||||
self->info_media = NULL;
|
self->info_media = NULL;
|
||||||
self->lost_packet_from_storage = TRUE;
|
self->lost_packet_from_storage = TRUE;
|
||||||
|
@ -421,6 +421,9 @@ gst_rtp_ulpfec_dec_handle_packet_loss (GstRtpUlpFecDec * self, guint16 seqnum,
|
||||||
|
|
||||||
sent_buffer = gst_buffer_copy_deep (recovered_buffer);
|
sent_buffer = gst_buffer_copy_deep (recovered_buffer);
|
||||||
|
|
||||||
|
if (self->lost_packet_from_storage)
|
||||||
|
gst_buffer_unref (recovered_buffer);
|
||||||
|
|
||||||
gst_rtp_buffer_map (sent_buffer, GST_MAP_WRITE, &rtp);
|
gst_rtp_buffer_map (sent_buffer, GST_MAP_WRITE, &rtp);
|
||||||
gst_rtp_buffer_set_seq (&rtp, self->next_seqnum++);
|
gst_rtp_buffer_set_seq (&rtp, self->next_seqnum++);
|
||||||
gst_rtp_buffer_unmap (&rtp);
|
gst_rtp_buffer_unmap (&rtp);
|
||||||
|
|
Loading…
Reference in a new issue