summaryrefslogtreecommitdiff
path: root/ext/kate/gstkateutil.c
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim.muller@collabora.co.uk>2011-01-02 13:52:36 +0000
committerTim-Philipp Müller <tim.muller@collabora.co.uk>2011-01-02 13:57:58 +0000
commit992c05f840381dd251d76eda4f3cc05fb5312c68 (patch)
tree18b908c8f720ce772b26bec6627b1a76d1c679d1 /ext/kate/gstkateutil.c
parent4b56970d58246dc6a961ee36937eaae180b3aaea (diff)
downloadgstreamer-plugins-bad-992c05f840381dd251d76eda4f3cc05fb5312c68.tar.gz
kate: fix caps and string leaks and some minor clean-ups
Don't leak source caps. Use GST_PTR_FORMAT to log caps, so we don't need to leak strings from gst_caps_to_string(). No need to use GST_DEBUG_FUNCPTR for vfuncs where the base class will never look them up (like property getters/setters). Don't use g_return_*_if_fail() for things that aren't directly programming errors (by the application developer). Fixes kate unit test under valgrind.
Diffstat (limited to 'ext/kate/gstkateutil.c')
-rw-r--r--ext/kate/gstkateutil.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/ext/kate/gstkateutil.c b/ext/kate/gstkateutil.c
index 14f425808..b873d0aca 100644
--- a/ext/kate/gstkateutil.c
+++ b/ext/kate/gstkateutil.c
@@ -282,12 +282,10 @@ gst_kate_util_decoder_base_chain_kate_packet (GstKateDecoderBase * decoder,
} else {
*src_caps = gst_caps_new_simple ("text/x-pango-markup", NULL);
}
- GST_INFO_OBJECT (element, "Setting src caps to %s",
- gst_caps_to_string (*src_caps));
+ GST_INFO_OBJECT (srcpad, "Setting caps: %" GST_PTR_FORMAT, *src_caps);
if (!gst_pad_set_caps (srcpad, *src_caps)) {
- GST_ERROR_OBJECT (element,
- "Failed to renegotiate caps for pad %s:%s",
- GST_DEBUG_PAD_NAME (srcpad));
+ GST_ERROR_OBJECT (srcpad, "Failed to set caps %" GST_PTR_FORMAT,
+ *src_caps);
}
}
if (decoder->k.ki->language && *decoder->k.ki->language) {