From 86e1e309c0e69f2e0bfec407c9afd90a3327ad90 Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Fri, 16 Sep 2005 15:43:08 +0000 Subject: [PATCH] Set setcaps function on sink pad, not source pad. Produce correct caps on output buffers. Original commit message from CVS: Set setcaps function on sink pad, not source pad. Produce correct caps on output buffers. --- ChangeLog | 6 ++++++ common | 2 +- gst/iec958/ac3iec.c | 6 +++--- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7a22ebf09b..8f17c0b499 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-09-16 Michael Smith + + * 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 * ext/mad/gstid3tag.c: diff --git a/common b/common index 30a1fc4dc2..39250a956e 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit 30a1fc4dc24133cc411e0232af87790ae2f845b2 +Subproject commit 39250a956e1dfc010fe9f9d93ca1e2c3a343cdca diff --git a/gst/iec958/ac3iec.c b/gst/iec958/ac3iec.c index 3f72a7e513..7ce03ea754 100644 --- a/gst/iec958/ac3iec.c +++ b/gst/iec958/ac3iec.c @@ -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;