Set setcaps function on sink pad, not source pad. Produce correct caps on output...
authorMichael Smith <msmith@xiph.org>
Fri, 16 Sep 2005 15:43:08 +0000 (15:43 +0000)
committerMichael Smith <msmith@xiph.org>
Fri, 16 Sep 2005 15:43:08 +0000 (15:43 +0000)
Original commit message from CVS:
Set setcaps function on sink pad, not source pad. Produce correct caps
on output buffers.

ChangeLog
common
gst/iec958/ac3iec.c

index 7a22ebf..8f17c0b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-09-16  Michael Smith <msmith@fluendo.com>
+
+       * gst/iec958/ac3iec.c: (ac3iec_init):
+         Set setcaps function on sink pad, not source pad. Produce correct
+         caps on output buffers.
+
 2005-09-07  Stefan Kost  <ensonic@users.sf.net>
 
        * ext/mad/gstid3tag.c:
diff --git a/common b/common
index 30a1fc4..39250a9 160000 (submodule)
--- a/common
+++ b/common
@@ -1 +1 @@
-Subproject commit 30a1fc4dc24133cc411e0232af87790ae2f845b2
+Subproject commit 39250a956e1dfc010fe9f9d93ca1e2c3a343cdca
index 3f72a7e..7ce03ea 100644 (file)
@@ -70,7 +70,7 @@ static GstStaticPadTemplate ac3iec_src_template =
 GST_STATIC_PAD_TEMPLATE ("src",
     GST_PAD_SRC,
     GST_PAD_ALWAYS,
-#if 1
+#if 0
     GST_STATIC_CAPS ("audio/x-raw-int, "
         "law = (int) 0, "
         "endianness = (int) " G_STRINGIFY (G_LITTLE_ENDIAN) ", "
@@ -78,7 +78,7 @@ GST_STATIC_PAD_TEMPLATE ("src",
         "width = (int) 16, "
         "depth = (int) 16, " "rate = (int) 48000, " "channels = (int) 2")
 #endif
-#if 0
+#if 1
     GST_STATIC_CAPS ("audio/x-iec958")
 #endif
     );
@@ -172,12 +172,12 @@ ac3iec_init (AC3IEC * ac3iec)
       gst_pad_new_from_template (gst_static_pad_template_get
       (&ac3iec_sink_template), "sink");
   gst_element_add_pad (GST_ELEMENT (ac3iec), ac3iec->sink);
+  gst_pad_set_setcaps_function (ac3iec->sink, ac3iec_setcaps);
   gst_pad_set_chain_function (ac3iec->sink, ac3iec_chain_dvd);
 
   ac3iec->src =
       gst_pad_new_from_template (gst_static_pad_template_get
       (&ac3iec_src_template), "src");
-  gst_pad_set_setcaps_function (ac3iec->src, ac3iec_setcaps);
   gst_element_add_pad (GST_ELEMENT (ac3iec), ac3iec->src);
 
   ac3iec->cur_ts = GST_CLOCK_TIME_NONE;