gst/mpegstream/gstmpegdemux.c: Add pad to element *after* setting functions such as event handler.

Original commit message from CVS:
2004-01-05  Ronald Bultje  <rbultje@ronald.bitfreak.net>

* gst/mpegstream/gstmpegdemux.c: (gst_mpeg_demux_parse_syshead):
Add pad to element *after* setting functions such as event handler.
Without this, the scheduler (opt) will link pads, set the event
handler from the default event function (dispatcher in gstpad.c)
and *after* that, we will set our own event function, which will
thus never be used (and thus mpegdemux doesn't handle events).
This commit is contained in:
Ronald S. Bultje 2004-01-05 11:17:23 +00:00
parent 151cca6d7f
commit b0dc93730c
2 changed files with 10 additions and 1 deletions

View file

@ -1,3 +1,12 @@
2004-01-05 Ronald Bultje <rbultje@ronald.bitfreak.net>
* gst/mpegstream/gstmpegdemux.c: (gst_mpeg_demux_parse_syshead):
Add pad to element *after* setting functions such as event handler.
Without this, the scheduler (opt) will link pads, set the event
handler from the default event function (dispatcher in gstpad.c)
and *after* that, we will set our own event function, which will
thus never be used (and thus mpegdemux doesn't handle events).
2004-01-04 David Schleef <ds@schleef.org>
Fix the fixate functions to handle new prototype:

View file

@ -458,7 +458,6 @@ gst_mpeg_demux_parse_syshead (GstMPEGParse *mpeg_parse, GstBuffer *buffer)
outpad = &((*outstream)->pad);
*outpad = gst_pad_new_from_template (newtemp, name);
gst_element_add_pad (GST_ELEMENT (mpeg_demux), (*outpad));
gst_pad_set_formats_function (*outpad, gst_mpeg_demux_get_src_formats);
gst_pad_set_convert_function (*outpad, gst_mpeg_parse_convert_src);
@ -467,6 +466,7 @@ gst_mpeg_demux_parse_syshead (GstMPEGParse *mpeg_parse, GstBuffer *buffer)
gst_pad_set_query_type_function (*outpad, gst_mpeg_parse_get_src_query_types);
gst_pad_set_query_function (*outpad, gst_mpeg_parse_handle_src_query);
gst_pad_use_explicit_caps (*outpad);
gst_element_add_pad (GST_ELEMENT (mpeg_demux), (*outpad));
gst_pad_set_explicit_caps (*outpad, caps);