From d33e6ca8189ae3df80d41909a5ab2186e877b9c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Tue, 23 Oct 2007 14:23:14 +0000 Subject: [PATCH] gst-libs/gst/tag/gsttagdemux.c: Don't abort with an assertion if we receive a seek event with a start type of NONE (s... Original commit message from CVS: * gst-libs/gst/tag/gsttagdemux.c: Don't abort with an assertion if we receive a seek event with a start type of NONE (see launchpad bug #155878). --- ChangeLog | 6 ++++++ gst-libs/gst/tag/gsttagdemux.c | 9 +++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index bc08e11523..b7aed4da30 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-10-23 Tim-Philipp Müller + + * gst-libs/gst/tag/gsttagdemux.c: + Don't abort with an assertion if we receive a seek event with + a start type of NONE (see launchpad bug #155878). + 2007-10-22 Wim Taymans * sys/ximage/ximagesink.c: (gst_ximagesink_event_thread), diff --git a/gst-libs/gst/tag/gsttagdemux.c b/gst-libs/gst/tag/gsttagdemux.c index 3d49b685ed..092f05727f 100644 --- a/gst-libs/gst/tag/gsttagdemux.c +++ b/gst-libs/gst/tag/gsttagdemux.c @@ -752,8 +752,10 @@ gst_tag_demux_get_upstream_size (GstTagDemux * tagdemux) static gboolean gst_tag_demux_srcpad_event (GstPad * pad, GstEvent * event) { + GstTagDemux *tagdemux; gboolean res = FALSE; - GstTagDemux *tagdemux = GST_TAG_DEMUX (GST_PAD_PARENT (pad)); + + tagdemux = GST_TAG_DEMUX (gst_pad_get_parent (pad)); /* Handle SEEK events, with adjusted byte offsets and sizes. */ @@ -789,8 +791,8 @@ gst_tag_demux_srcpad_event (GstPad * pad, GstEvent * event) cur = 0; cur -= tagdemux->priv->strip_end; break; + case GST_SEEK_TYPE_NONE: default: - g_assert_not_reached (); break; } switch (stop_type) { @@ -809,6 +811,7 @@ gst_tag_demux_srcpad_event (GstPad * pad, GstEvent * event) stop = 0; stop -= tagdemux->priv->strip_end; break; + case GST_SEEK_TYPE_NONE: default: break; } @@ -819,9 +822,11 @@ gst_tag_demux_srcpad_event (GstPad * pad, GstEvent * event) break; } default: + /* FIXME: shouldn't we pass unknown and unhandled events upstream? */ break; } + gst_object_unref (tagdemux); gst_event_unref (event); return res; }