mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-23 15:48:23 +00:00
audioencoder: plug a definite and rare leak
This commit is contained in:
parent
8da252a21c
commit
6eeca397fc
1 changed files with 5 additions and 2 deletions
|
@ -439,14 +439,15 @@ gst_audio_encoder_reset (GstAudioEncoder * enc, gboolean full)
|
|||
enc->priv->active = FALSE;
|
||||
enc->priv->samples_in = 0;
|
||||
enc->priv->bytes_out = 0;
|
||||
gst_audio_info_init (&enc->priv->ctx.info);
|
||||
memset (&enc->priv->ctx, 0, sizeof (enc->priv->ctx));
|
||||
|
||||
g_list_foreach (enc->priv->ctx.headers, (GFunc) gst_buffer_unref, NULL);
|
||||
g_list_free (enc->priv->ctx.headers);
|
||||
enc->priv->ctx.headers = NULL;
|
||||
enc->priv->ctx.new_headers = FALSE;
|
||||
|
||||
memset (&enc->priv->ctx, 0, sizeof (enc->priv->ctx));
|
||||
gst_audio_info_init (&enc->priv->ctx.info);
|
||||
|
||||
if (enc->priv->tags)
|
||||
gst_tag_list_free (enc->priv->tags);
|
||||
enc->priv->tags = NULL;
|
||||
|
@ -828,6 +829,8 @@ exit:
|
|||
no_caps:
|
||||
{
|
||||
GST_ELEMENT_ERROR (enc, STREAM, ENCODE, ("no caps set"), (NULL));
|
||||
if (buf)
|
||||
gst_buffer_unref (buf);
|
||||
return GST_FLOW_ERROR;
|
||||
}
|
||||
overflow:
|
||||
|
|
Loading…
Reference in a new issue