From 8e0adba996d81b469078eeeefeeecfb772439743 Mon Sep 17 00:00:00 2001 From: Tristan Matthews Date: Fri, 4 Jun 2010 14:54:59 -0400 Subject: [PATCH] gstrtpceltpay: don't always fixate sink caps to 1 channel The getcaps function should not fixate the channels field until we get the encoding-params field from our srcpad's caps. Fixes #620591 --- gst/rtp/gstrtpceltpay.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gst/rtp/gstrtpceltpay.c b/gst/rtp/gstrtpceltpay.c index 74fa9a9e04..7524a27b00 100644 --- a/gst/rtp/gstrtpceltpay.c +++ b/gst/rtp/gstrtpceltpay.c @@ -186,9 +186,10 @@ gst_rtp_celt_pay_getcaps (GstBaseRTPPayload * payload, GstPad * pad) if (frame_size) gst_structure_set (s, "frame-size", G_TYPE_INT, frame_size, NULL); - if ((params = gst_structure_get_string (ps, "encoding-params"))) + if ((params = gst_structure_get_string (ps, "encoding-params"))) { channels = atoi (params); - gst_structure_fixate_field_nearest_int (s, "channels", channels); + gst_structure_fixate_field_nearest_int (s, "channels", channels); + } GST_DEBUG_OBJECT (payload, "clock-rate=%d frame-size=%d channels=%d", clock_rate, frame_size, channels);