katedec: handle segment event earlier

Delaying the segment event to when caps are decided can cause issues as
the first thing katedec does on its chain function it doing a segment clip.
It will lead to an assertion if the segment format is undefined

https://bugzilla.gnome.org/show_bug.cgi?id=733226
This commit is contained in:
Thiago Santos 2014-07-15 16:42:57 -03:00
parent b0e63bbb9b
commit e26e112e80
2 changed files with 4 additions and 1 deletions

View file

@ -499,7 +499,6 @@ gst_kate_dec_sink_handle_event (GstPad * pad, GstObject * parent,
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_SEGMENT:
gst_kate_util_decoder_base_segment_event (&kd->decoder, event);
break;
case GST_EVENT_FLUSH_START:

View file

@ -153,6 +153,10 @@ gst_kate_util_decoder_base_queue_event (GstKateDecoderBase * decoder,
case GST_EVENT_EOS:
can_be_queued = FALSE;
break;
case GST_EVENT_SEGMENT:
gst_kate_util_decoder_base_segment_event (decoder, event);
can_be_queued = TRUE;
break;
default:
can_be_queued = TRUE;
break;