diff options
author | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2007-03-24 23:53:34 +0000 |
---|---|---|
committer | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2007-03-24 23:53:34 +0000 |
commit | 5f7ab90a0c2c7330d55f8389dc9cd771a644f032 (patch) | |
tree | 58a47604c6153b67e85a75836554f4ae3bc775ce /libavcodec/gifdec.c | |
parent | 93e91145b41eb067c183d445e99d337384a288a4 (diff) | |
download | ffmpeg-5f7ab90a0c2c7330d55f8389dc9cd771a644f032.tar.gz |
simplify
Originally committed as revision 8500 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/gifdec.c')
-rw-r--r-- | libavcodec/gifdec.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/libavcodec/gifdec.c b/libavcodec/gifdec.c index 64b4931354..392625e98a 100644 --- a/libavcodec/gifdec.c +++ b/libavcodec/gifdec.c @@ -245,10 +245,8 @@ static int gif_read_header1(GifState *s) static int gif_parse_next_image(GifState *s) { - int ret, code; - for (;;) { - code = bytestream_get_byte(&s->bytestream); + int code = bytestream_get_byte(&s->bytestream); #ifdef DEBUG dprintf(s->avctx, "gif: code=%02x '%c'\n", code, code); #endif @@ -256,25 +254,19 @@ static int gif_parse_next_image(GifState *s) case ',': if (gif_read_image(s) < 0) return -1; - ret = 0; - goto the_end; + return 0; case ';': /* end of image */ - ret = -1; - goto the_end; + return -1; case '!': if (gif_read_extension(s) < 0) return -1; break; - case EOF: default: /* error or errneous EOF */ - ret = -1; - goto the_end; + return -1; } } - the_end: - return ret; } static int gif_decode_init(AVCodecContext *avctx) |