From 4d40ac3fc59f226431fc0b47eaaeba1dec260762 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Mon, 16 Apr 2018 17:04:06 +0200 Subject: [PATCH] video: Don't corrupt caption GstMeta the meta initialization function is provided *after* the base implementation fields have been set so do *NOT* reset them otherwise it would result in corrupted GstMeta. Instead explicitely set our fields to the default values we actually want. --- gst-libs/gst/video/video-anc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gst-libs/gst/video/video-anc.c b/gst-libs/gst/video/video-anc.c index eb1c18681d..32d075ee1f 100644 --- a/gst-libs/gst/video/video-anc.c +++ b/gst-libs/gst/video/video-anc.c @@ -458,8 +458,9 @@ gst_video_caption_meta_init (GstMeta * meta, gpointer params, { GstVideoCaptionMeta *emeta = (GstVideoCaptionMeta *) meta; - memset (emeta, 0, sizeof (GstVideoCaptionMeta)); emeta->caption_type = GST_VIDEO_CAPTION_TYPE_UNKNOWN; + emeta->data = NULL; + emeta->size = 0; return TRUE; }