[FFmpeg-devel] [PATCH 1/3] avcodec/pnm_parser: Factor next	initialization out
    Michael Niedermayer 
    michael at niedermayer.cc
       
    Sun Apr  7 02:21:12 EEST 2019
    
    
  
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
 libavcodec/pnm_parser.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/libavcodec/pnm_parser.c b/libavcodec/pnm_parser.c
index e3bfa3c490..91a9edc016 100644
--- a/libavcodec/pnm_parser.c
+++ b/libavcodec/pnm_parser.c
@@ -47,6 +47,7 @@ retry:
         pnmctx.bytestream       = (uint8_t *) buf + skip; /* casts avoid warnings */
         pnmctx.bytestream_end   = (uint8_t *) buf + buf_size - skip;
     }
+    next = END_NOT_FOUND;
     if (ff_pnm_decode_header(avctx, &pnmctx) < 0) {
         if (pnmctx.bytestream < pnmctx.bytestream_end) {
             if (pc->index) {
@@ -58,12 +59,10 @@ retry:
             }
             goto retry;
         }
-        next = END_NOT_FOUND;
     } else if (pnmctx.type < 4) {
               uint8_t *bs  = pnmctx.bytestream;
         const uint8_t *end = pnmctx.bytestream_end;
 
-        next = END_NOT_FOUND;
         while (bs < end) {
             int c = *bs++;
             if (c == '#')  {
-- 
2.21.0
    
    
More information about the ffmpeg-devel
mailing list