gst/mpegstream/gstmpegdemux.c: Add pad to element *after* setting the pad functions...
authorWim Taymans <wim.taymans@gmail.com>
Fri, 9 Jul 2004 14:11:02 +0000 (14:11 +0000)
committerWim Taymans <wim.taymans@gmail.com>
Fri, 9 Jul 2004 14:11:02 +0000 (14:11 +0000)
Original commit message from CVS:
* gst/mpegstream/gstmpegdemux.c: (gst_mpeg_demux_new_output_pad),
(gst_mpeg_demux_parse_packet), (gst_mpeg_demux_process_private):
Add pad to element *after* setting the pad functions so that
the scheduler can use the correct ones.

ChangeLog
gst/mpegstream/gstmpegdemux.c

index a46772b..5155b78 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2004-07-09  Wim Taymans  <wim@fluendo.com>
 
+       * gst/mpegstream/gstmpegdemux.c: (gst_mpeg_demux_new_output_pad),
+       (gst_mpeg_demux_parse_packet), (gst_mpeg_demux_process_private):
+       Add pad to element *after* setting the pad functions so that
+       the scheduler can use the correct ones.
+
+2004-07-09  Wim Taymans  <wim@fluendo.com>
+
        * ext/theora/theoradec.c: (theora_dec_from_granulepos),
        (theora_dec_src_query), (theora_dec_src_event), (theora_dec_chain):
        Sync to keyframe after seek
index f461c44..e16c3ff 100644 (file)
@@ -331,7 +331,6 @@ gst_mpeg_demux_new_output_pad (GstMPEGDemux * mpeg_demux,
   GstPad *pad;
 
   pad = gst_pad_new_from_template (temp, name);
-  gst_element_add_pad (GST_ELEMENT (mpeg_demux), pad);
 
   gst_pad_set_formats_function (pad, gst_mpeg_demux_get_src_formats);
   gst_pad_set_convert_function (pad, gst_mpeg_parse_convert_src);
@@ -341,6 +340,8 @@ gst_mpeg_demux_new_output_pad (GstMPEGDemux * mpeg_demux,
   gst_pad_set_query_function (pad, gst_mpeg_parse_handle_src_query);
   gst_pad_use_explicit_caps (pad);
 
+  gst_element_add_pad (GST_ELEMENT (mpeg_demux), pad);
+
   return pad;
 }
 
@@ -714,6 +715,7 @@ done:
 
   /* calculate the amount of real data in this packet */
   datalen = packet_length - headerlen + 2;
+
   GST_DEBUG_OBJECT (mpeg_demux, "headerlen is %d, datalen is %d",
       headerlen, datalen);