Commit 16d44dee authored by bcoudurier's avatar bcoudurier

simplify

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@8500 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent bb970d32
...@@ -245,10 +245,8 @@ static int gif_read_header1(GifState *s) ...@@ -245,10 +245,8 @@ static int gif_read_header1(GifState *s)
static int gif_parse_next_image(GifState *s) static int gif_parse_next_image(GifState *s)
{ {
int ret, code;
for (;;) { for (;;) {
code = bytestream_get_byte(&s->bytestream); int code = bytestream_get_byte(&s->bytestream);
#ifdef DEBUG #ifdef DEBUG
dprintf(s->avctx, "gif: code=%02x '%c'\n", code, code); dprintf(s->avctx, "gif: code=%02x '%c'\n", code, code);
#endif #endif
...@@ -256,25 +254,19 @@ static int gif_parse_next_image(GifState *s) ...@@ -256,25 +254,19 @@ static int gif_parse_next_image(GifState *s)
case ',': case ',':
if (gif_read_image(s) < 0) if (gif_read_image(s) < 0)
return -1; return -1;
ret = 0; return 0;
goto the_end;
case ';': case ';':
/* end of image */ /* end of image */
ret = -1; return -1;
goto the_end;
case '!': case '!':
if (gif_read_extension(s) < 0) if (gif_read_extension(s) < 0)
return -1; return -1;
break; break;
case EOF:
default: default:
/* error or errneous EOF */ /* error or errneous EOF */
ret = -1; return -1;
goto the_end;
} }
} }
the_end:
return ret;
} }
static int gif_decode_init(AVCodecContext *avctx) static int gif_decode_init(AVCodecContext *avctx)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment