From 279727d777ad0aa4ae89230e7a71d9982dd48f4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Mon, 1 Jun 2009 13:47:01 +0100 Subject: [PATCH] baseparse: don't try to GST_LOG an already-freed caps string The proper way to log caps is via GST_PTR_FORMAT anyway. --- gst/aacparse/gstbaseparse.c | 8 ++------ gst/amrparse/gstbaseparse.c | 8 ++------ gst/flacparse/gstbaseparse.c | 8 ++------ 3 files changed, 6 insertions(+), 18 deletions(-) diff --git a/gst/aacparse/gstbaseparse.c b/gst/aacparse/gstbaseparse.c index 34d28ec20f..5a256a0a6c 100644 --- a/gst/aacparse/gstbaseparse.c +++ b/gst/aacparse/gstbaseparse.c @@ -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); } diff --git a/gst/amrparse/gstbaseparse.c b/gst/amrparse/gstbaseparse.c index e0f1f4d731..cd17063680 100644 --- a/gst/amrparse/gstbaseparse.c +++ b/gst/amrparse/gstbaseparse.c @@ -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); } diff --git a/gst/flacparse/gstbaseparse.c b/gst/flacparse/gstbaseparse.c index 066fe517fd..4d28d65f92 100644 --- a/gst/flacparse/gstbaseparse.c +++ b/gst/flacparse/gstbaseparse.c @@ -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); }