Commit e736f293 authored by Johan Bjäreholt's avatar Johan Bjäreholt Committed by Sebastian Dröge

matroska-demux: Fix caps memleak

https://bugzilla.gnome.org/show_bug.cgi?id=797326
parent 560a6155
......@@ -3278,6 +3278,7 @@ gst_matroska_demux_update_tracks (GstMatroskaDemux * demux, GstEbmlRead * ebml)
if (!gst_caps_is_equal (old_track->caps, new_track->caps)) {
gst_pad_set_caps (new_track->pad, new_track->caps);
}
gst_caps_replace (&old_track->caps, NULL);
if (!gst_tag_list_is_equal (old_track->tags, new_track->tags)) {
GST_DEBUG_OBJECT (old_track->pad, "Sending tags %p: %"
......
......@@ -335,6 +335,7 @@ gst_matroska_track_free (GstMatroskaTrackContext * track)
g_free (track->language);
g_free (track->codec_priv);
g_free (track->codec_state);
gst_caps_replace (&track->caps, NULL);
if (track->encodings != NULL) {
int i;
......
......@@ -3289,7 +3289,6 @@ gst_matroska_read_common_reset (GstElement * element,
if (context->pad != NULL)
gst_element_remove_pad (element, context->pad);
gst_caps_replace (&context->caps, NULL);
gst_matroska_track_free (context);
}
g_ptr_array_free (ctx->src, TRUE);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment