summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2021-08-13 19:35:23 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2021-08-13 19:35:23 +0530
commit3ced923da5baf8b7f64dc3b126195aae9b835099 (patch)
treefc1937b0f36ee784e1548d8fe8fbd8afb85984cf
parent04856a3828411fe23fc043787b7687c0416e51fc (diff)
downloadgstreamer-plugins-base-3ced923da5baf8b7f64dc3b126195aae9b835099.tar.gz
sdp: Avoid using g_memdup() since it is deprecated
g_memdup() is deprecated since GLib 2.68 and we want to avoid deprecation warnings with recent versions of GLib. Instead of using g_memdup2(), we can simply use the new gst_buffer_new_memdup() added in 1.19.x Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1254>
-rw-r--r--gst-libs/gst/sdp/gstmikey.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/gst-libs/gst/sdp/gstmikey.c b/gst-libs/gst/sdp/gstmikey.c
index cacabb730..99ab676a2 100644
--- a/gst-libs/gst/sdp/gstmikey.c
+++ b/gst-libs/gst/sdp/gstmikey.c
@@ -2490,9 +2490,7 @@ gst_mikey_message_to_caps (const GstMIKEYMessage * msg, GstCaps * caps)
goto done;
pkd = (GstMIKEYPayloadKeyData *) sub;
- buf =
- gst_buffer_new_wrapped (g_memdup (pkd->key_data, pkd->key_len),
- pkd->key_len);
+ buf = gst_buffer_new_memdup (pkd->key_data, pkd->key_len);
gst_caps_set_simple (caps, "srtp-key", GST_TYPE_BUFFER, buf, NULL);
gst_buffer_unref (buf);
}