ext/vorbis/vorbisenc.c: Stop leaking taglists.

Original commit message from CVS:
* ext/vorbis/vorbisenc.c: (gst_vorbisenc_init),
(gst_vorbisenc_change_state):
Stop leaking taglists.
This commit is contained in:
Wim Taymans 2005-08-24 21:03:32 +00:00
parent 46e443bdd5
commit 963941df57
2 changed files with 10 additions and 4 deletions

View file

@ -1,3 +1,9 @@
2005-08-24 Wim Taymans <wim@fluendo.com>
* ext/vorbis/vorbisenc.c: (gst_vorbisenc_init),
(gst_vorbisenc_change_state):
Stop leaking taglists.
2005-08-24 Wim Taymans <wim@fluendo.com>
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_src_query),

View file

@ -521,8 +521,6 @@ gst_vorbisenc_init (GstVorbisEnc * vorbisenc)
vorbisenc->setup = FALSE;
vorbisenc->eos = FALSE;
vorbisenc->header_sent = FALSE;
vorbisenc->tags = gst_tag_list_new ();
}
@ -1099,6 +1097,8 @@ gst_vorbisenc_change_state (GstElement * element)
switch (transition) {
case GST_STATE_NULL_TO_READY:
vorbisenc->tags = gst_tag_list_new ();
break;
case GST_STATE_READY_TO_PAUSED:
vorbisenc->eos = FALSE;
break;
@ -1115,10 +1115,10 @@ gst_vorbisenc_change_state (GstElement * element)
case GST_STATE_PAUSED_TO_READY:
vorbisenc->setup = FALSE;
vorbisenc->header_sent = FALSE;
gst_tag_list_free (vorbisenc->tags);
vorbisenc->tags = gst_tag_list_new ();
break;
case GST_STATE_READY_TO_NULL:
gst_tag_list_free (vorbisenc->tags);
vorbisenc->tags = NULL;
default:
break;
}