Revision 5f7ab90a

View differences:

libavcodec/gifdec.c
245 245

  
246 246
static int gif_parse_next_image(GifState *s)
247 247
{
248
    int ret, code;
249

  
250 248
    for (;;) {
251
        code = bytestream_get_byte(&s->bytestream);
249
        int code = bytestream_get_byte(&s->bytestream);
252 250
#ifdef DEBUG
253 251
        dprintf(s->avctx, "gif: code=%02x '%c'\n", code, code);
254 252
#endif
......
256 254
        case ',':
257 255
            if (gif_read_image(s) < 0)
258 256
                return -1;
259
            ret = 0;
260
            goto the_end;
257
            return 0;
261 258
        case ';':
262 259
            /* end of image */
263
            ret = -1;
264
            goto the_end;
260
            return -1;
265 261
        case '!':
266 262
            if (gif_read_extension(s) < 0)
267 263
                return -1;
268 264
            break;
269
        case EOF:
270 265
        default:
271 266
            /* error or errneous EOF */
272
            ret = -1;
273
            goto the_end;
267
            return -1;
274 268
        }
275 269
    }
276
  the_end:
277
    return ret;
278 270
}
279 271

  
280 272
static int gif_decode_init(AVCodecContext *avctx)

Also available in: Unified diff