lame/lamemp3enc: Fix memory leak on FLUSH_STOP

This commit is contained in:
Sebastian Dröge 2009-04-30 10:16:45 +02:00
parent bd6eb05e95
commit 699f1707c3
2 changed files with 2 additions and 0 deletions

View file

@ -1023,6 +1023,7 @@ gst_lame_sink_event (GstPad * pad, GstEvent * event)
mp3_buffer_size = 7200; mp3_buffer_size = 7200;
mp3_data = g_malloc (mp3_buffer_size); mp3_data = g_malloc (mp3_buffer_size);
lame_encode_flush (lame->lgf, mp3_data, mp3_buffer_size); lame_encode_flush (lame->lgf, mp3_data, mp3_buffer_size);
g_free (mp3_data);
ret = gst_pad_push_event (lame->srcpad, event); ret = gst_pad_push_event (lame->srcpad, event);
break; break;

View file

@ -587,6 +587,7 @@ gst_lamemp3enc_sink_event (GstPad * pad, GstEvent * event)
mp3_buffer_size = 7200; mp3_buffer_size = 7200;
mp3_data = g_malloc (mp3_buffer_size); mp3_data = g_malloc (mp3_buffer_size);
lame_encode_flush (lame->lgf, mp3_data, mp3_buffer_size); lame_encode_flush (lame->lgf, mp3_data, mp3_buffer_size);
g_free (mp3_data);
ret = gst_pad_push_event (lame->srcpad, event); ret = gst_pad_push_event (lame->srcpad, event);
break; break;