theoraparse: Fix event handling

Send CAPS event before any SEGMENT events or any other events
that must come in order after the CAPS event.
This commit is contained in:
Sebastian Dröge 2013-11-29 13:32:55 +01:00
parent 9011bc1b54
commit 1d4cf74e0b

View file

@ -365,11 +365,11 @@ theora_parse_push_headers (GstTheoraParse * parse)
{
gint i;
theora_parse_drain_event_queue (parse);
if (!parse->streamheader_received)
theora_parse_set_streamheader (parse);
theora_parse_drain_event_queue (parse);
/* ignore return values, we pass along the result of pushing data packets only
*/
for (i = 0; i < 3; i++) {
@ -719,7 +719,8 @@ theora_parse_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
ret = gst_pad_event_default (pad, parent, event);
break;
default:
if (parse->send_streamheader && GST_EVENT_IS_SERIALIZED (event))
if (parse->send_streamheader && GST_EVENT_IS_SERIALIZED (event)
&& GST_EVENT_TYPE (event) > GST_EVENT_CAPS)
ret = theora_parse_queue_event (parse, event);
else
ret = gst_pad_event_default (pad, parent, event);