mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 09:55:36 +00:00
flacparse: fix buffer leak when stored to seektable
Fix a leak with the validate.file.playback.change_state_intensive.samples_multimedia_cx_flac_Yesterday_flac scenario. https://bugzilla.gnome.org/show_bug.cgi?id=749072
This commit is contained in:
parent
3792e9ca9b
commit
2bd3685d04
1 changed files with 6 additions and 0 deletions
|
@ -305,6 +305,10 @@ gst_flac_parse_finalize (GObject * object)
|
|||
gst_toc_unref (flacparse->toc);
|
||||
flacparse->toc = NULL;
|
||||
}
|
||||
if (flacparse->seektable) {
|
||||
gst_buffer_unref (flacparse->seektable);
|
||||
flacparse->seektable = NULL;
|
||||
}
|
||||
|
||||
g_list_foreach (flacparse->headers, (GFunc) gst_mini_object_unref, NULL);
|
||||
g_list_free (flacparse->headers);
|
||||
|
@ -1163,6 +1167,8 @@ gst_flac_parse_handle_seektable (GstFlacParse * flacparse, GstBuffer * buffer)
|
|||
GST_DEBUG_OBJECT (flacparse, "storing seektable");
|
||||
/* only store for now;
|
||||
* offset of the first frame is needed to get real info */
|
||||
if (flacparse->seektable)
|
||||
gst_buffer_unref (flacparse->seektable);
|
||||
flacparse->seektable = gst_buffer_ref (buffer);
|
||||
|
||||
return TRUE;
|
||||
|
|
Loading…
Reference in a new issue