mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
baseparse: don't try to GST_LOG an already-freed caps string
The proper way to log caps is via GST_PTR_FORMAT anyway.
This commit is contained in:
parent
f5a03ec2a6
commit
279727d777
3 changed files with 6 additions and 18 deletions
|
@ -1730,18 +1730,14 @@ gst_base_parse_sink_setcaps (GstPad * pad, GstCaps * caps)
|
|||
GstBaseParseClass *klass;
|
||||
gboolean res = TRUE;
|
||||
|
||||
gchar *caps_str = gst_caps_to_string (caps);
|
||||
g_free (caps_str);
|
||||
|
||||
parse = GST_BASE_PARSE (gst_pad_get_parent (pad));
|
||||
parse = GST_BASE_PARSE (GST_PAD_PARENT (pad));
|
||||
klass = GST_BASE_PARSE_GET_CLASS (parse);
|
||||
|
||||
GST_DEBUG_OBJECT (parse, "setcaps: %s", caps_str);
|
||||
GST_DEBUG_OBJECT (parse, "caps: %" GST_PTR_FORMAT, caps);
|
||||
|
||||
if (klass->set_sink_caps)
|
||||
res = klass->set_sink_caps (parse, caps);
|
||||
|
||||
parse->negotiated = res;
|
||||
gst_object_unref (parse);
|
||||
return gst_pad_set_caps (pad, caps);
|
||||
}
|
||||
|
|
|
@ -1730,18 +1730,14 @@ gst_base_parse_sink_setcaps (GstPad * pad, GstCaps * caps)
|
|||
GstBaseParseClass *klass;
|
||||
gboolean res = TRUE;
|
||||
|
||||
gchar *caps_str = gst_caps_to_string (caps);
|
||||
g_free (caps_str);
|
||||
|
||||
parse = GST_BASE_PARSE (gst_pad_get_parent (pad));
|
||||
parse = GST_BASE_PARSE (GST_PAD_PARENT (pad));
|
||||
klass = GST_BASE_PARSE_GET_CLASS (parse);
|
||||
|
||||
GST_DEBUG_OBJECT (parse, "setcaps: %s", caps_str);
|
||||
GST_DEBUG_OBJECT (parse, "caps: %" GST_PTR_FORMAT, caps);
|
||||
|
||||
if (klass->set_sink_caps)
|
||||
res = klass->set_sink_caps (parse, caps);
|
||||
|
||||
parse->negotiated = res;
|
||||
gst_object_unref (parse);
|
||||
return gst_pad_set_caps (pad, caps);
|
||||
}
|
||||
|
|
|
@ -1960,18 +1960,14 @@ gst_base_parse_sink_setcaps (GstPad * pad, GstCaps * caps)
|
|||
GstBaseParseClass *klass;
|
||||
gboolean res = TRUE;
|
||||
|
||||
gchar *caps_str = gst_caps_to_string (caps);
|
||||
g_free (caps_str);
|
||||
|
||||
parse = GST_BASE_PARSE (gst_pad_get_parent (pad));
|
||||
parse = GST_BASE_PARSE (GST_PAD_PARENT (pad));
|
||||
klass = GST_BASE_PARSE_GET_CLASS (parse);
|
||||
|
||||
GST_DEBUG_OBJECT (parse, "setcaps: %s", caps_str);
|
||||
GST_DEBUG_OBJECT (parse, "caps: %" GST_PTR_FORMAT, caps);
|
||||
|
||||
if (klass->set_sink_caps)
|
||||
res = klass->set_sink_caps (parse, caps);
|
||||
|
||||
parse->negotiated = res;
|
||||
gst_object_unref (parse);
|
||||
return gst_pad_set_caps (pad, caps);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue