rtmp2: Fix allocation of GstRtmpMeta

Use the right size.

On 64-bit platforms, `GstMetaInfo` is larger than `GstRtmpMeta`, which
masked this bug. On 32-bit platforms, it causes crashes. Thanks to
@maxatka for discovering this.

Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1721
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2553>
This commit is contained in:
Jan Alexander Steffens (heftig) 2022-06-04 17:23:00 +02:00 committed by GStreamer Marge Bot
parent 637406cdb1
commit 5ebc9427d9

View file

@ -207,7 +207,7 @@ gst_rtmp_meta_get_info (void)
if (g_once_init_enter (&rtmp_meta_info)) {
const GstMetaInfo *meta = gst_meta_register (GST_RTMP_META_API_TYPE,
"GstRtmpMeta", sizeof *meta, gst_rtmp_meta_init, NULL,
"GstRtmpMeta", sizeof (GstRtmpMeta), gst_rtmp_meta_init, NULL,
gst_rtmp_meta_transform);
g_once_init_leave (&rtmp_meta_info, meta);
}