Browse Source

simplify

Originally committed as revision 8500 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
Baptiste Coudurier 18 years ago
parent
commit
5f7ab90a0c
1 changed files with 4 additions and 12 deletions
  1. +4
    -12
      libavcodec/gifdec.c

+ 4
- 12
libavcodec/gifdec.c View File

@@ -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)
case ',': case ',':
if (gif_read_image(s) < 0) if (gif_read_image(s) < 0)
return -1; return -1;
ret = 0;
goto the_end;
return 0;
case ';': case ';':
/* end of image */ /* end of image */
ret = -1;
goto the_end;
return -1;
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;
goto the_end;
return -1;
} }
} }
the_end:
return ret;
} }


static int gif_decode_init(AVCodecContext *avctx) static int gif_decode_init(AVCodecContext *avctx)


Loading…
Cancel
Save