matroska-ids: Fix uninitialized memory in contexts

https://bugzilla.gnome.org/show_bug.cgi?id=797327
This commit is contained in:
Johan Bjäreholt 2018-10-23 13:04:34 +02:00 committed by Sebastian Dröge
parent 01a2119ad0
commit abfc7da345

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