mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-12 02:15:31 +00:00
mpegtsmux: plug leaks when freeing stream
This commit is contained in:
parent
244f28c938
commit
c2387d8bf6
1 changed files with 12 additions and 0 deletions
|
@ -214,8 +214,20 @@ tsmux_stream_get_pid (TsMuxStream * stream)
|
||||||
void
|
void
|
||||||
tsmux_stream_free (TsMuxStream * stream)
|
tsmux_stream_free (TsMuxStream * stream)
|
||||||
{
|
{
|
||||||
|
GList *cur;
|
||||||
|
|
||||||
g_return_if_fail (stream != NULL);
|
g_return_if_fail (stream != NULL);
|
||||||
|
|
||||||
|
/* free buffers */
|
||||||
|
for (cur = stream->buffers; cur; cur = cur->next) {
|
||||||
|
TsMuxStreamBuffer *tmbuf = (TsMuxStreamBuffer *) cur->data;
|
||||||
|
|
||||||
|
if (stream->buffer_release)
|
||||||
|
stream->buffer_release (tmbuf->data, tmbuf->user_data);
|
||||||
|
g_slice_free (TsMuxStreamBuffer, tmbuf);
|
||||||
|
}
|
||||||
|
g_list_free (stream->buffers);
|
||||||
|
|
||||||
g_slice_free (TsMuxStream, stream);
|
g_slice_free (TsMuxStream, stream);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue