summaryrefslogtreecommitdiffstats
path: root/gst/rtp/gstrtpilbcpay.c
diff options
context:
space:
mode:
authorOlivier Crete <tester@tester.ca>2007-08-08 10:54:50 +0000
committerWim Taymans <wim.taymans@gmail.com>2007-08-08 10:54:50 +0000
commitcfc23b6130ff1ff4fba44750e9c03ac47099ff1f (patch)
tree053855874aa1fed5a2a1b50e373c9dcb1db27bce /gst/rtp/gstrtpilbcpay.c
parent04bae8775a73641649a81f37dac0189382c9673c (diff)
gst/rtp/: Make mode property a string. Fixes #464475.
Original commit message from CVS: Patch by: Olivier Crete <tester at tester dot ca> * gst/rtp/gstrtpilbcdepay.c: (gst_rtp_ilbc_depay_setcaps): * gst/rtp/gstrtpilbcpay.c: (gst_rtpilbcpay_setcaps): Make mode property a string. Fixes #464475.
Diffstat (limited to 'gst/rtp/gstrtpilbcpay.c')
-rw-r--r--gst/rtp/gstrtpilbcpay.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/gst/rtp/gstrtpilbcpay.c b/gst/rtp/gstrtpilbcpay.c
index 736e633d..708f5357 100644
--- a/gst/rtp/gstrtpilbcpay.c
+++ b/gst/rtp/gstrtpilbcpay.c
@@ -50,7 +50,8 @@ GST_STATIC_PAD_TEMPLATE ("src",
"media = (string) \"audio\", "
"payload = (int) " GST_RTP_PAYLOAD_DYNAMIC_STRING ", "
"clock-rate = (int) 8000, "
- "encoding-name = (string) \"ILBC\", " "mode = (int) {20, 30}")
+ "encoding-name = (string) \"ILBC\", "
+ "mode = (string) { \"20\", \"30\" }")
);
static gboolean gst_rtpilbcpay_setcaps (GstBaseRTPPayload * payload,
@@ -116,6 +117,7 @@ gst_rtpilbcpay_setcaps (GstBaseRTPPayload * basertppayload, GstCaps * caps)
GstBaseRTPAudioPayload *basertpaudiopayload;
gboolean ret;
gint mode;
+ gchar *mode_str;
GstStructure *structure;
const char *payload_name;
@@ -137,9 +139,13 @@ gst_rtpilbcpay_setcaps (GstBaseRTPPayload * basertppayload, GstCaps * caps)
gst_base_rtp_audio_payload_set_frame_options (basertpaudiopayload,
mode, mode == 30 ? 50 : 38);
+
+ mode_str = g_strdup_printf ("%d", mode);
ret =
- gst_basertppayload_set_outcaps (basertppayload, "mode", G_TYPE_INT, mode,
- NULL);
+ gst_basertppayload_set_outcaps (basertppayload, "mode", G_TYPE_STRING,
+ mode_str, NULL);
+ g_free (mode_str);
+
if (mode != rtpilbcpay->mode && rtpilbcpay->mode != -1)
goto mode_changed;