You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
avcodec/pnm_parser: Factor next initialization out
Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@@ -47,6 +47,7 @@ retry:
|
|||||||
pnmctx.bytestream = (uint8_t *) buf + skip; /* casts avoid warnings */
|
pnmctx.bytestream = (uint8_t *) buf + skip; /* casts avoid warnings */
|
||||||
pnmctx.bytestream_end = (uint8_t *) buf + buf_size - skip;
|
pnmctx.bytestream_end = (uint8_t *) buf + buf_size - skip;
|
||||||
}
|
}
|
||||||
|
next = END_NOT_FOUND;
|
||||||
if (ff_pnm_decode_header(avctx, &pnmctx) < 0) {
|
if (ff_pnm_decode_header(avctx, &pnmctx) < 0) {
|
||||||
if (pnmctx.bytestream < pnmctx.bytestream_end) {
|
if (pnmctx.bytestream < pnmctx.bytestream_end) {
|
||||||
if (pc->index) {
|
if (pc->index) {
|
||||||
@@ -58,12 +59,10 @@ retry:
|
|||||||
}
|
}
|
||||||
goto retry;
|
goto retry;
|
||||||
}
|
}
|
||||||
next = END_NOT_FOUND;
|
|
||||||
} else if (pnmctx.type < 4) {
|
} else if (pnmctx.type < 4) {
|
||||||
uint8_t *bs = pnmctx.bytestream;
|
uint8_t *bs = pnmctx.bytestream;
|
||||||
const uint8_t *end = pnmctx.bytestream_end;
|
const uint8_t *end = pnmctx.bytestream_end;
|
||||||
|
|
||||||
next = END_NOT_FOUND;
|
|
||||||
while (bs < end) {
|
while (bs < end) {
|
||||||
int c = *bs++;
|
int c = *bs++;
|
||||||
if (c == '#') {
|
if (c == '#') {
|
||||||
|
Reference in New Issue
Block a user