This is an automated email from the git hooks/post-receive script.
Git pushed a commit to branch master
in repository ffmpeg.
The following commit(s) were added to refs/heads/master by this push:
new 5fb8bfe275 avcodec/opus/enc: get the sample size once in
spawn_empty_frame
5fb8bfe275 is described below
commit 5fb8bfe275fb47c88e54b041476677d64bfe3ab7
Author: romainhedouin <[email protected]>
AuthorDate: Thu Oct 15 13:02:31 2026 +0200
Commit: James Almer <[email protected]>
CommitDate: Thu Oct 15 13:13:11 2026 +0000
avcodec/opus/enc: get the sample size once in spawn_empty_frame
It was looked up again for every channel. No change in output.
Found during a code review sweep of ffmpeg using an LLM.
---
libavcodec/opus/enc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/opus/enc.c b/libavcodec/opus/enc.c
index c451a5b552..a82929069c 100644
--- a/libavcodec/opus/enc.c
+++ b/libavcodec/opus/enc.c
@@ -547,8 +547,8 @@ static AVFrame *spawn_empty_frame(OpusEncContext *s)
av_frame_free(&f);
return NULL;
}
+ size_t bps = av_get_bytes_per_sample(f->format);
for (int i = 0; i < s->channels; i++) {
- size_t bps = av_get_bytes_per_sample(f->format);
memset(f->extended_data[i], 0, bps*f->nb_samples);
}
return f;
--
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]