icydemux: fix tag list handling issues that might have caused crashes
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Mon, 21 Feb 2011 00:55:49 +0000 (00:55 +0000)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Mon, 21 Feb 2011 11:03:03 +0000 (11:03 +0000)
commit06972db7b6a55f951833327a659afc76bef6b5c8
tree2a1915b4a98c299e4a3fa3f5ab2b25a36a3f316c
parent8e6b876e76c94410db160afe5eb30f21452e419f
icydemux: fix tag list handling issues that might have caused crashes

Fix slightly confused tag handling in some places: make it clear when
we're taking ownership of a tag list and when not. For example,
gst_icydemux_tag_found() was taking ownership when the source pad
existed, but otherwise not (leak). Also, gst_event_parse_tag() does
not return a newly-allocated taglist, but a tag list that belongs to
the tag event, so don't give ownership of it away.

While we're at it, some minor clean-ups: don't re-invent g_strndup()
and simplify gst_icydemux_parse_and_send_tags() a bit, and don't
leak the tag list in case no valid tags where found.

https://bugzilla.gnome.org/show_bug.cgi?id=641330
gst/icydemux/gsticydemux.c