From: Stian Selnes Date: Mon, 30 Jun 2014 13:07:45 +0000 (+0200) Subject: rtpsession: handle sdes messages with non-utf8 more gracefully X-Git-Tag: 1.19.3~509^2~2588 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=85a56f8ee35dfb620c8b1db79aa770d278c8a1f1;p=platform%2Fupstream%2Fgstreamer.git rtpsession: handle sdes messages with non-utf8 more gracefully --- diff --git a/gst/rtpmanager/rtpsession.c b/gst/rtpmanager/rtpsession.c index 553d793744..e3bf338cd6 100644 --- a/gst/rtpmanager/rtpsession.c +++ b/gst/rtpmanager/rtpsession.c @@ -2393,7 +2393,11 @@ rtp_session_process_sdes (RTPSession * sess, GstRTCPPacket * packet, value = g_strndup ((const gchar *) data, len); - gst_structure_set (sdes, name, G_TYPE_STRING, value, NULL); + if (g_utf8_validate (value, -1, NULL)) { + gst_structure_set (sdes, name, G_TYPE_STRING, value, NULL); + } else { + GST_WARNING ("ignore SDES field %s with non-utf8 data %s", name, value); + } g_free (name); g_free (value);