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.
This commit is contained in:
Edward Hervey 2018-04-16 17:04:06 +02:00 committed by Edward Hervey
parent debe7d2fdf
commit 4d40ac3fc5

View file

@ -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;
}