diff mbox series

[FFmpeg-devel,3/8] libavcodec/jpeg2000_parser: next_state is just a temporary

Message ID 6ed6259c6d9bb5145610c88d1694abdc8a869cf1.camel@acc.umu.se
State New
Headers show
Series [FFmpeg-devel,1/8] libavcodec/jpeg2000_parser: Speed up long skips | expand

Checks

Context Check Description
andriy/configure_x86 warning Failed to apply patch

Commit Message

Tomas Härdin May 31, 2022, 9:59 a.m. UTC

Comments

Michael Niedermayer June 1, 2022, 4:43 p.m. UTC | #1
On Tue, May 31, 2022 at 11:59:42AM +0200, Tomas Härdin wrote:
> 

>  jpeg2000_parser.c |    3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> c4714ab68e0049d0ee84e5c7f89582c5426c10ad  0003-libavcodec-jpeg2000_parser-next_state-is-just-a-temp.patch
> From 682701613a9b816aac9e75848216e3c7e6a12974 Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Tomas=20H=C3=A4rdin?= <git@haerdin.se>
> Date: Fri, 20 May 2022 11:45:23 +0200
> Subject: [PATCH 3/8] libavcodec/jpeg2000_parser: next_state is just a
>  temporary
> 
> ---
>  libavcodec/jpeg2000_parser.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)

LGTM

thx

[...]
diff mbox series

Patch

From 682701613a9b816aac9e75848216e3c7e6a12974 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tomas=20H=C3=A4rdin?= <git@haerdin.se>
Date: Fri, 20 May 2022 11:45:23 +0200
Subject: [PATCH 3/8] libavcodec/jpeg2000_parser: next_state is just a
 temporary

---
 libavcodec/jpeg2000_parser.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/libavcodec/jpeg2000_parser.c b/libavcodec/jpeg2000_parser.c
index a7f72710e4..c6d8416d43 100644
--- a/libavcodec/jpeg2000_parser.c
+++ b/libavcodec/jpeg2000_parser.c
@@ -82,7 +82,6 @@  static int find_frame_end(JPEG2000ParserContext *m, const uint8_t *buf, int buf_
 {
     ParseContext *pc= &m->pc;
     int i;
-    uint32_t next_state;
     uint64_t state64 = pc->state64;
 
     if (buf_size == 0) {
@@ -157,7 +156,7 @@  static int find_frame_end(JPEG2000ParserContext *m, const uint8_t *buf, int buf_
 
             // If the next marker is an info marker, skip to the end of of the marker length.
             if (i + m->skip_bytes + 1 < buf_size) {
-                next_state = (buf[i + m->skip_bytes] << 8) | buf[i + m->skip_bytes + 1];
+                uint32_t next_state = (buf[i + m->skip_bytes] << 8) | buf[i + m->skip_bytes + 1];
                 if (info_marker(next_state)) {
                     // Skip an additional 2 bytes to get to the end of the marker length.
                     m->skip_bytes += 2;
-- 
2.30.2