mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-28 19:20:35 +00:00
ffmpegdec: Don't leak the GstDataPassThrough items
This commit is contained in:
parent
b7f737fd8a
commit
f9c2467241
1 changed files with 13 additions and 0 deletions
|
@ -1659,6 +1659,18 @@ opaque_find (GstFFMpegDec * ffmpegdec, gpointer opaque_val, guint64 * _ts,
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
flush_opaque (GstFFMpegDec * ffmpegdec)
|
||||
{
|
||||
GList *tmp;
|
||||
|
||||
for (tmp = ffmpegdec->opaque; tmp; tmp = tmp->next)
|
||||
g_slice_free (GstDataPassThrough, tmp->data);
|
||||
if (ffmpegdec->opaque)
|
||||
g_list_free (ffmpegdec->opaque);
|
||||
ffmpegdec->opaque = NULL;
|
||||
}
|
||||
|
||||
/* gst_ffmpegdec_[video|audio]_frame:
|
||||
* ffmpegdec:
|
||||
* data: pointer to the data to decode
|
||||
|
@ -2741,6 +2753,7 @@ gst_ffmpegdec_change_state (GstElement * element, GstStateChange transition)
|
|||
GST_OBJECT_UNLOCK (ffmpegdec);
|
||||
clear_queued (ffmpegdec);
|
||||
g_free (ffmpegdec->padded);
|
||||
flush_opaque (ffmpegdec);
|
||||
ffmpegdec->padded = NULL;
|
||||
ffmpegdec->padded_size = 0;
|
||||
ffmpegdec->can_allocate_aligned = TRUE;
|
||||
|
|
Loading…
Reference in a new issue