+2007-08-08 Wim Taymans <wim.taymans@gmail.com>
+
+ 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.
+
2007-08-05 Stefan Kost <ensonic@users.sf.net>
* ext/flac/gstflacenc.c:
"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 GstStaticPadTemplate gst_rtp_ilbc_depay_src_template =
GstRTPiLBCDepay *rtpilbcdepay = GST_RTP_ILBC_DEPAY (depayload);
GstCaps *srccaps;
GstStructure *structure;
+ const gchar *mode_str = NULL;
gint mode;
gboolean ret;
structure = gst_caps_get_structure (caps, 0);
- /* parse mode, if we can */
mode = rtpilbcdepay->mode;
- gst_structure_get_int (structure, "mode", &mode);
+
+ /* parse mode, if we can */
+ mode_str = gst_structure_get_string (structure, "mode");
+ if (mode_str) {
+ mode = strtol (mode_str, NULL, 10);
+ if (mode != 20 && mode != 30)
+ mode = rtpilbcdepay->mode;
+ }
+
rtpilbcdepay->mode = mode;
srccaps = gst_caps_new_simple ("audio/x-iLBC",
"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,
GstBaseRTPAudioPayload *basertpaudiopayload;
gboolean ret;
gint mode;
+ gchar *mode_str;
GstStructure *structure;
const char *payload_name;
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;