Make sure set_explicit_caps() is called before adding pad.
authorDavid Schleef <ds@schleef.org>
Wed, 4 Feb 2004 21:40:49 +0000 (21:40 +0000)
committerDavid Schleef <ds@schleef.org>
Wed, 4 Feb 2004 21:40:49 +0000 (21:40 +0000)
Original commit message from CVS:
Make sure set_explicit_caps() is called before adding pad.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_loop):
* gst/id3/gstid3types.c: (gst_id3types_loop):
* gst/mpegstream/gstmpegdemux.c: (gst_mpeg_demux_parse_syshead):
* gst/realmedia/rmdemux.c: (gst_rmdemux_add_stream):

ChangeLog
gst/mpegstream/gstmpegdemux.c
gst/realmedia/rmdemux.c

index 736b955..26e77f4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2004-02-04  David Schleef  <ds@schleef.org>
+
+       Make sure set_explicit_caps() is called before adding pad.
+       * ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_loop):
+       * gst/id3/gstid3types.c: (gst_id3types_loop):
+       * gst/mpegstream/gstmpegdemux.c: (gst_mpeg_demux_parse_syshead):
+       * gst/realmedia/rmdemux.c: (gst_rmdemux_add_stream):
+
 2004-02-04  Thomas Vander Stichele  <thomas at apestaart dot org>
 
        * configure.ac:
index bace6f7..93a0d38 100644 (file)
@@ -467,13 +467,14 @@ gst_mpeg_demux_parse_syshead (GstMPEGParse *mpeg_parse, GstBuffer *buffer)
        gst_pad_set_query_function (*outpad, gst_mpeg_parse_handle_src_query);
        if (caps && gst_caps_is_fixed (caps))
          gst_pad_use_explicit_caps (*outpad);
-        gst_element_add_pad (GST_ELEMENT (mpeg_demux), (*outpad));
 
        if (caps && gst_caps_is_fixed (caps))
           gst_pad_set_explicit_caps (*outpad, caps);
        else if (caps)
          gst_caps_free (caps);
 
+        gst_element_add_pad (GST_ELEMENT (mpeg_demux), (*outpad));
+
        gst_pad_set_element_private (*outpad, *outstream);
 
        (*outstream)->size_bound = buf_byte_size_bound;
index 9ad85fe..e3e0365 100644 (file)
@@ -512,12 +512,12 @@ void gst_rmdemux_add_stream(GstRMDemux *rmdemux, GstRMDemuxStream *stream)
   if(stream->pad){
     gst_pad_use_explicit_caps (stream->pad);
 
-    g_print("adding pad %p to rmdemux %p\n", stream->pad, rmdemux);
-    gst_element_add_pad(GST_ELEMENT (rmdemux), stream->pad);
-
     GST_DEBUG ("setting caps: " GST_PTR_FORMAT, stream->caps);
 
     gst_pad_set_explicit_caps(stream->pad, stream->caps);
+
+    GST_DEBUG ("adding pad %p to rmdemux %p", stream->pad, rmdemux);
+    gst_element_add_pad(GST_ELEMENT (rmdemux), stream->pad);
   }
 }