Mercurial > libavcodec.hg
changeset 4717:dd9ad0da0a51 libavcodec
simplify
author | bcoudurier |
---|---|
date | Sat, 24 Mar 2007 23:53:34 +0000 |
parents | 8c00d22d45a0 |
children | 9962405d2d18 |
files | gifdec.c |
diffstat | 1 files changed, 4 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/gifdec.c Sat Mar 24 23:23:51 2007 +0000 +++ b/gifdec.c Sat Mar 24 23:53:34 2007 +0000 @@ -245,10 +245,8 @@ 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 @@ 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)