From: michaelni via ffmpeg-devel <ffmpeg-devel@ffmpeg.org> To: ffmpeg-devel@ffmpeg.org Cc: michaelni <code@ffmpeg.org> Subject: [FFmpeg-devel] [PATCH] avcodec/g723_1enc: Make min_err 64bit (PR #20658) Date: Tue, 07 Oct 2025 00:25:37 -0000 Message-ID: <175979673774.65.10773446148404556407@bf249f23a2c8> (raw) PR #20658 opened by michaelni URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20658 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20658.patch This fixes the case of leaving the struct uninitialized and crashing Untested, as no testcase Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> >From 54e775f818592e54c7e0fe2603bfd15e9a8e24bb Mon Sep 17 00:00:00 2001 From: Michael Niedermayer <michael@niedermayer.cc> Date: Tue, 7 Oct 2025 01:58:34 +0200 Subject: [PATCH] avcodec/g723_1enc: Make min_err 64bit This fixes the case of leaving the struct uninitialized and crashing Untested, as no testcase Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> --- libavcodec/g723_1.h | 2 +- libavcodec/g723_1enc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/g723_1.h b/libavcodec/g723_1.h index 521f220b2a..f3cd32e37d 100644 --- a/libavcodec/g723_1.h +++ b/libavcodec/g723_1.h @@ -108,7 +108,7 @@ typedef struct HFParam { * Optimized fixed codebook excitation parameters */ typedef struct FCBParam { - int min_err; + int64_t min_err; int amp_index; int grid_index; int dirac_train; diff --git a/libavcodec/g723_1enc.c b/libavcodec/g723_1enc.c index ee5b0fe251..4fd4567a87 100644 --- a/libavcodec/g723_1enc.c +++ b/libavcodec/g723_1enc.c @@ -1013,7 +1013,7 @@ static void fcb_search(G723_1_ChannelContext *p, int16_t *impulse_resp, int pulse_cnt = pulses[index]; int i; - optim.min_err = 1 << 30; + optim.min_err = 1LL << 31; get_fcb_param(&optim, impulse_resp, buf, pulse_cnt, SUBFRAME_LEN); if (p->pitch_lag[index >> 1] < SUBFRAME_LEN - 2) { -- 2.49.1 _______________________________________________ ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org
reply other threads:[~2025-10-07 0:26 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=175979673774.65.10773446148404556407@bf249f23a2c8 \ --to=ffmpeg-devel@ffmpeg.org \ --cc=code@ffmpeg.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror http://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ http://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git