summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2019-04-06 14:41:33 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2019-04-10 22:33:38 +0200
commit1d43d72b181afd59f9719c3bc38446f206fc3c6e (patch)
treebe43a6d9e7f08f5b06bbe363d7c83faf85160f58
parent7f3d39b21f893145dcfd33abf6f6a2c994b246ec (diff)
avcodec/pnm_parser: Factor next initialization out
Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/pnm_parser.c3
1 files changed, 1 insertions, 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 == '#') {