From b191c8f609556cb1df9371b5102832198eff7bef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Wed, 27 Feb 2008 10:23:27 +0000 Subject: [PATCH] gst-libs/gst/tag/gsttagdemux.c: Push tag event after the newsegment event. Log the pointer of the buffer we're actual... Original commit message from CVS: * gst-libs/gst/tag/gsttagdemux.c: (gst_tag_demux_chain): Push tag event after the newsegment event. Log the pointer of the buffer we're actually going to push rather than the buffer we're feeding to _make_metadata_writable(). --- ChangeLog | 7 +++++++ common | 2 +- gst-libs/gst/tag/gsttagdemux.c | 25 ++++++++++++------------- 3 files changed, 20 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index 918f12840a..e9e7c04ca4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-02-27 Tim-Philipp Müller + + * gst-libs/gst/tag/gsttagdemux.c: (gst_tag_demux_chain): + Push tag event after the newsegment event. Log the pointer of + the buffer we're actually going to push rather than the buffer + we're feeding to _make_metadata_writable(). + 2008-02-25 Sebastian Dröge * gst/typefind/gsttypefindfunctions.c: (plugin_init): diff --git a/common b/common index a574e6214b..e746d20ef5 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit a574e6214b06fcbdfc00e952e2f3edc06997ee93 +Subproject commit e746d20ef536a73aea9964666c7d5f6d5c9465df diff --git a/gst-libs/gst/tag/gsttagdemux.c b/gst-libs/gst/tag/gsttagdemux.c index 4cd5411e5d..0709b7b636 100644 --- a/gst-libs/gst/tag/gsttagdemux.c +++ b/gst-libs/gst/tag/gsttagdemux.c @@ -640,11 +640,6 @@ gst_tag_demux_chain (GstPad * pad, GstBuffer * buf) case GST_TAG_DEMUX_STREAMING:{ GstBuffer *outbuf = NULL; - if (demux->priv->send_tag_event) { - gst_tag_demux_send_tag_event (demux); - demux->priv->send_tag_event = FALSE; - } - /* Trim the buffer and adjust offset */ if (demux->priv->collect) { outbuf = demux->priv->collect; @@ -658,14 +653,6 @@ gst_tag_demux_chain (GstPad * pad, GstBuffer * buf) return GST_FLOW_ERROR; } - GST_DEBUG_OBJECT (demux, "Pushing buffer %p", outbuf); - /* gst_util_dump_mem (GST_BUFFER_DATA (outbuf), - GST_BUFFER_SIZE (outbuf)); */ - - /* Ensure the caps are set correctly */ - outbuf = gst_buffer_make_metadata_writable (outbuf); - gst_buffer_set_caps (outbuf, GST_PAD_CAPS (demux->priv->srcpad)); - /* Might need a new segment before the buffer */ if (demux->priv->need_newseg) { if (!gst_tag_demux_send_new_segment (demux)) { @@ -675,6 +662,18 @@ gst_tag_demux_chain (GstPad * pad, GstBuffer * buf) demux->priv->need_newseg = FALSE; } + /* Send pending tag event */ + if (demux->priv->send_tag_event) { + gst_tag_demux_send_tag_event (demux); + demux->priv->send_tag_event = FALSE; + } + + /* Ensure the caps are set correctly */ + outbuf = gst_buffer_make_metadata_writable (outbuf); + gst_buffer_set_caps (outbuf, GST_PAD_CAPS (demux->priv->srcpad)); + + GST_LOG_OBJECT (demux, "Pushing buffer %p", outbuf); + return gst_pad_push (demux->priv->srcpad, outbuf); } }