From: Georgi Gerganov Date: Tue, 21 Feb 2023 17:00:42 +0000 (+0200) Subject: whisper : zero-initialize some more context variables X-Git-Tag: upstream/1.7.4~1562 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=373043cabecc1d456d99debe8ebe2d2801f30c2b;p=pkg%2Fggml%2Fsources%2Fwhisper.cpp whisper : zero-initialize some more context variables Just in case --- diff --git a/whisper.cpp b/whisper.cpp index 9c9aefdf..3a21581c 100644 --- a/whisper.cpp +++ b/whisper.cpp @@ -592,11 +592,11 @@ struct whisper_context { mutable std::mt19937 rng; // used for sampling at t > 0.0 - int lang_id; + int lang_id = 0; // english by default // [EXPERIMENTAL] token-level timestamps data - int64_t t_beg; - int64_t t_last; + int64_t t_beg = 0; + int64_t t_last = 0; whisper_token tid_last; std::vector energy; // PCM signal energy @@ -4339,7 +4339,7 @@ int whisper_full_n_segments(struct whisper_context * ctx) { } int whisper_full_lang_id(struct whisper_context * ctx) { - return ctx->lang_id; + return ctx->lang_id; } int64_t whisper_full_get_segment_t0(struct whisper_context * ctx, int i_segment) {