Commit 12134979 authored by Tim-Philipp Müller's avatar Tim-Philipp Müller

oggdemux: post/send tags with the container-format tag

For this to work properly, theoradec and vorbisdec need to put
tag events received from upstream into the pending_events list
so they get pushed out after any newsegment event, not before.
parent 81a0a986
......@@ -1834,9 +1834,13 @@ gst_ogg_demux_activate_chain (GstOggDemux * ogg, GstOggChain * chain,
gst_element_no_more_pads (GST_ELEMENT (ogg));
/* FIXME, must be sent from the streaming thread */
if (event)
if (event) {
gst_ogg_demux_send_event (ogg, event);
gst_element_found_tags (GST_ELEMENT_CAST (ogg),
gst_tag_list_new_full (GST_TAG_CONTAINER_FORMAT, "Ogg", NULL));
}
GST_DEBUG_OBJECT (ogg, "starting chain");
/* then send out any queued buffers */
......@@ -2957,7 +2961,7 @@ gst_ogg_demux_send_event (GstOggDemux * ogg, GstEvent * event)
GstOggPad *pad = g_array_index (chain->streams, GstOggPad *, i);
gst_event_ref (event);
GST_DEBUG_OBJECT (ogg, "Pushing event on pad %p", pad);
GST_DEBUG_OBJECT (pad, "Pushing event %" GST_PTR_FORMAT, event);
gst_pad_push_event (GST_PAD (pad), event);
}
}
......
......@@ -721,6 +721,18 @@ theora_dec_sink_event (GstPad * pad, GstEvent * event)
}
break;
}
case GST_EVENT_TAG:
{
if (dec->have_header)
/* and forward */
ret = gst_pad_push_event (dec->srcpad, event);
else {
/* store it to send once we're initialized */
dec->pendingevents = g_list_append (dec->pendingevents, event);
ret = TRUE;
}
break;
}
default:
ret = gst_pad_push_event (dec->srcpad, event);
break;
......
......@@ -547,6 +547,18 @@ vorbis_dec_sink_event (GstPad * pad, GstEvent * event)
}
break;
}
case GST_EVENT_TAG:
{
if (dec->initialized)
/* and forward */
ret = gst_pad_push_event (dec->srcpad, event);
else {
/* store it to send once we're initialized */
dec->pendingevents = g_list_append (dec->pendingevents, event);
ret = TRUE;
}
break;
}
default:
ret = gst_pad_push_event (dec->srcpad, event);
break;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment