From 2d2c5eaa546613d1447654ebdbcb210b72d54ef9 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 9 Jul 2004 14:11:02 +0000 Subject: [PATCH] gst/mpegstream/gstmpegdemux.c: Add pad to element *after* setting the pad functions so that the scheduler can use the... 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 | 7 +++++++ gst/mpegstream/gstmpegdemux.c | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index a46772bc8a..5155b78f6a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2004-07-09 Wim Taymans + + * 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 * ext/theora/theoradec.c: (theora_dec_from_granulepos), diff --git a/gst/mpegstream/gstmpegdemux.c b/gst/mpegstream/gstmpegdemux.c index f461c448f9..e16c3ff8d9 100644 --- a/gst/mpegstream/gstmpegdemux.c +++ b/gst/mpegstream/gstmpegdemux.c @@ -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);