Skip to content

Commit

Permalink
fix(cpp): possible deref fail in vad_simple
Browse files Browse the repository at this point in the history
  • Loading branch information
jhen0409 committed Jan 17, 2024
1 parent 1fb3fa3 commit 8efd9c9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cpp/rn-whisper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ void job::set_realtime_params(
}

bool job::vad_simple(int slice_index, int n_samples, int n) {
if (slice_index >= pcm_slices.size()) return !vad.use_vad;
if (!vad.use_vad) return true;

short* pcm = pcm_slices[slice_index];
Expand Down

0 comments on commit 8efd9c9

Please sign in to comment.