This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

commit a17e96b1037ab5448081cf141deb05e2c1b9d5fc
Author:     Zhao Zhili <[email protected]>
AuthorDate: Thu May 7 14:42:09 2026 +0800
Commit:     James Almer <[email protected]>
CommitDate: Thu May 7 13:01:16 2026 +0000

    avcodec/hevc: scope missing-ref loop counters locally
---
 libavcodec/hevc/refs.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/libavcodec/hevc/refs.c b/libavcodec/hevc/refs.c
index f53768f816..55db706a8a 100644
--- a/libavcodec/hevc/refs.c
+++ b/libavcodec/hevc/refs.c
@@ -466,7 +466,6 @@ static void mark_ref(HEVCFrame *frame, int flag)
 static HEVCFrame *generate_missing_ref(HEVCContext *s, HEVCLayerContext *l, 
int poc)
 {
     HEVCFrame *frame;
-    int i, y;
 
     frame = alloc_frame(s, l);
     if (!frame)
@@ -475,12 +474,12 @@ static HEVCFrame *generate_missing_ref(HEVCContext *s, 
HEVCLayerContext *l, int
     if (!s->avctx->hwaccel) {
         int nb_planes = l->sps->chroma_format_idc ? 3 : 1;
         if (!l->sps->pixel_shift) {
-            for (i = 0; i < nb_planes; i++)
+            for (int i = 0; i < nb_planes; i++)
                 memset(frame->f->data[i], 1 << (l->sps->bit_depth - 1),
                        frame->f->linesize[i] * AV_CEIL_RSHIFT(l->sps->height, 
l->sps->vshift[i]));
         } else {
-            for (i = 0; i < nb_planes; i++)
-                for (y = 0; y < (l->sps->height >> l->sps->vshift[i]); y++) {
+            for (int i = 0; i < nb_planes; i++)
+                for (int y = 0; y < (l->sps->height >> l->sps->vshift[i]); 
y++) {
                     uint8_t *dst = frame->f->data[i] + y * 
frame->f->linesize[i];
                     AV_WN16(dst, 1 << (l->sps->bit_depth - 1));
                     av_memcpy_backptr(dst + 2, 2, 2*(l->sps->width >> 
l->sps->hshift[i]) - 2);

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to