matroska-ids: Fix uninitialized memory in contexts
authorJohan Bjäreholt <johanbj@axis.com>
Tue, 23 Oct 2018 11:04:34 +0000 (13:04 +0200)
committerSebastian Dröge <sebastian@centricular.com>
Wed, 24 Oct 2018 08:54:20 +0000 (09:54 +0100)
https://bugzilla.gnome.org/show_bug.cgi?id=797327

gst/matroska/matroska-ids.c

index b964043..517956a 100644 (file)
@@ -58,6 +58,9 @@ gst_matroska_track_init_video_context (GstMatroskaTrackContext ** p_context)
   video_context->asr_mode = 0;
   video_context->fourcc = 0;
   video_context->default_fps = 0.0;
+  video_context->interlace_mode = GST_MATROSKA_INTERLACE_MODE_UNKNOWN;
+  video_context->earliest_time = GST_CLOCK_TIME_NONE;
+  video_context->dirac_unit = NULL;
   video_context->earliest_time = GST_CLOCK_TIME_NONE;
   video_context->multiview_mode = GST_VIDEO_MULTIVIEW_MODE_NONE;
   video_context->multiview_flags = GST_VIDEO_MULTIVIEW_FLAGS_NONE;
@@ -93,6 +96,8 @@ gst_matroska_track_init_audio_context (GstMatroskaTrackContext ** p_context)
   (*p_context)->type = GST_MATROSKA_TRACK_TYPE_AUDIO;
   audio_context->channels = 1;
   audio_context->samplerate = 8000;
+  audio_context->bitdepth = 16;
+  audio_context->wvpk_block_index = 0;
   return TRUE;
 }
 
@@ -116,7 +121,9 @@ gst_matroska_track_init_subtitle_context (GstMatroskaTrackContext ** p_context)
   *p_context = (GstMatroskaTrackContext *) subtitle_context;
 
   (*p_context)->type = GST_MATROSKA_TRACK_TYPE_SUBTITLE;
+  subtitle_context->check_utf8 = TRUE;
   subtitle_context->invalid_utf8 = FALSE;
+  subtitle_context->check_markup = TRUE;
   subtitle_context->seen_markup_tag = FALSE;
   return TRUE;
 }