[FFmpeg-cvslog] lavc/jpeg2000dec: Move a variable declaration closer to its usage.

Carl Eugen Hoyos git at videolan.org
Tue May 22 13:56:54 EEST 2018


ffmpeg | branch: master | Carl Eugen Hoyos <ceffmpeg at gmail.com> | Tue May 22 12:55:46 2018 +0200| [1083808c48cd58fe3b14dbfbbc3f46c2ae6c0352] | committer: Carl Eugen Hoyos

lavc/jpeg2000dec: Move a variable declaration closer to its usage.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1083808c48cd58fe3b14dbfbbc3f46c2ae6c0352
---

 libavcodec/jpeg2000dec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c
index 5fa9b9de8f..66f11bb2b2 100644
--- a/libavcodec/jpeg2000dec.c
+++ b/libavcodec/jpeg2000dec.c
@@ -2053,7 +2053,6 @@ static int jp2_find_codestream(Jpeg2000DecoderContext *s)
                     }
                 } else if (atom2 == MKBETAG('p','c','l','r') && atom2_size >= 6) {
                     int i, size, colour_count, colour_channels, colour_depth[3];
-                    uint32_t r, g, b;
                     colour_count = bytestream2_get_be16u(&s->g);
                     colour_channels = bytestream2_get_byteu(&s->g);
                     // FIXME: Do not ignore channel_sign
@@ -2075,6 +2074,7 @@ static int jp2_find_codestream(Jpeg2000DecoderContext *s)
                     }
                     s->pal8 = 1;
                     for (i = 0; i < colour_count; i++) {
+                        uint32_t r, g, b;
                         if (colour_depth[0] <= 8) {
                             r = bytestream2_get_byteu(&s->g) << 8 - colour_depth[0];
                             r |= r >> colour_depth[0];



More information about the ffmpeg-cvslog mailing list