Commit f9b49aef authored by Mathieu Duponchelle's avatar Mathieu Duponchelle 🐸 Committed by Tim-Philipp Müller

rtpulpfecdec: fix buffer leak when packet is recovered from storage

Exposed by rtpulpfecdec_recovered_from_storage test.
parent a2d01b3a
......@@ -134,7 +134,7 @@ gst_rtp_ulpfec_dec_start (GstRtpUlpFecDec * self, GstBufferList * buflist,
GST_LOG_RTP_PACKET (self, "rtp header (incoming)", &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);
self->info_media = NULL;
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);
if (self->lost_packet_from_storage)
gst_buffer_unref (recovered_buffer);
gst_rtp_buffer_map (sent_buffer, GST_MAP_WRITE, &rtp);
gst_rtp_buffer_set_seq (&rtp, self->next_seqnum++);
gst_rtp_buffer_unmap (&rtp);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment