From 3caf16a1994b55b4ca19e2d5802b6a60e0a1149c Mon Sep 17 00:00:00 2001 From: Seungha Yang Date: Fri, 6 Apr 2018 23:22:39 +0900 Subject: [PATCH] h265parse: Make caps writable before modifying them Fix following assertion failure GStreamer-CRITICAL **: gst_structure_remove_field: assertion 'IS_MUTABLE (structure)' failed https://bugzilla.gnome.org/show_bug.cgi?id=795032 --- gst/videoparsers/gsth265parse.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gst/videoparsers/gsth265parse.c b/gst/videoparsers/gsth265parse.c index 46de66f514..d68423e0f8 100644 --- a/gst/videoparsers/gsth265parse.c +++ b/gst/videoparsers/gsth265parse.c @@ -2268,8 +2268,10 @@ gst_h265_parse_get_caps (GstBaseParse * parse, GstCaps * filter) } /* Try if we can put the downstream caps first */ - remove_fields (peercaps, FALSE); - tmp = gst_caps_intersect_full (peercaps, res, GST_CAPS_INTERSECT_FIRST); + pcopy = gst_caps_copy (peercaps); + remove_fields (pcopy, FALSE); + tmp = gst_caps_intersect_full (pcopy, res, GST_CAPS_INTERSECT_FIRST); + gst_caps_unref (pcopy); if (!gst_caps_is_empty (tmp)) res = gst_caps_merge (tmp, res); else