[0.11] gst-plugins-ugly: mad: Make sure to set caps on the srcpad if none are set yet

Sebastian Dröge slomo at kemper.freedesktop.org
Mon Jan 9 06:16:22 PST 2012


Module: gst-plugins-ugly
Branch: 0.11
Commit: a120944340b06457e238e278fcf6fe7cdadf36ab
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-ugly/commit/?id=a120944340b06457e238e278fcf6fe7cdadf36ab

Author: Sebastian Dröge <sebastian.droege at collabora.co.uk>
Date:   Mon Jan  9 15:15:28 2012 +0100

mad: Make sure to set caps on the srcpad if none are set yet

---

 ext/mad/gstmad.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/ext/mad/gstmad.c b/ext/mad/gstmad.c
index c5a2ccc..dae4264 100644
--- a/ext/mad/gstmad.c
+++ b/ext/mad/gstmad.c
@@ -222,7 +222,8 @@ gst_mad_check_caps_reset (GstMad * mad)
    * so check this first before doing anything */
 
   /* only set caps if they weren't already set for this continuous stream */
-  if (mad->channels != nchannels || mad->rate != rate) {
+  if (!gst_pad_has_current_caps (GST_AUDIO_DECODER_SRC_PAD (mad))
+      || mad->channels != nchannels || mad->rate != rate) {
     GstCaps *caps;
 
     if (mad->caps_set) {



More information about the gstreamer-commits mailing list