matroskademux: use g_memdup2() as g_memdup() is deprecated
authorTim-Philipp Müller <tim@centricular.com>
Sun, 23 May 2021 00:28:11 +0000 (01:28 +0100)
committerTim-Philipp Müller <tim@centricular.com>
Wed, 2 Jun 2021 16:34:38 +0000 (17:34 +0100)
commit05854f74c52b713ad68e8ecae9abab8e0cbb3956
tree25193e42ffabc3982777d1ebb7b5bb13fb9ce1c3
parentbf56fd97b6cec2a059abd29b144675aad818e442
matroskademux: use g_memdup2() as g_memdup() is deprecated

- ebml-read: add some sanity checks when going from 64-bit
  to 32-bit length
- matroska-ids: codec_data_size has been checked via
  gst_ebml_read_binary(), is existing allocation.
- matroska-demux: alloc size is from existing allocations

g_memdup() is deprecated since GLib 2.68 and we want to avoid
deprecation warnings with recent versions of GLib.

Also use gst_buffer_new_memdup() instead of _wrapped(g_memdup(),..).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/993>
gst/matroska/ebml-read.c
gst/matroska/matroska-demux.c
gst/matroska/matroska-ids.c
gst/matroska/matroska-read-common.c