rtp: fix buffer leak when gst_rtp_buffer_map() fails because of broken data

Makes libs/rtp unit test valgrind clean.
This commit is contained in:
Tim-Philipp Müller 2012-08-22 09:20:55 +01:00
parent 1968127650
commit 392d3225ce

View file

@ -443,7 +443,14 @@ wrong_padding:
}
dump_packet:
{
gint i;
GST_MEMDUMP ("buffer", data, size);
for (i = 0; i < G_N_ELEMENTS (rtp->map); ++i) {
if (rtp->data[i] != NULL)
gst_buffer_unmap (buffer, &rtp->map[i]);
}
return FALSE;
}
}