Mercurial > libavcodec.hg
comparison png.c @ 2453:f67b63ed036d libavcodec
avoid buf_size == 0 checks in every decoder
author | michael |
---|---|
date | Sun, 23 Jan 2005 18:09:06 +0000 |
parents | 18b8b2dcc037 |
children | b2846918585c |
comparison
equal
deleted
inserted
replaced
2452:73a66a4a6ab4 | 2453:f67b63ed036d |
---|---|
477 AVFrame *picture = data; | 477 AVFrame *picture = data; |
478 AVFrame * const p= (AVFrame*)&s->picture; | 478 AVFrame * const p= (AVFrame*)&s->picture; |
479 uint32_t tag, length; | 479 uint32_t tag, length; |
480 int ret, crc; | 480 int ret, crc; |
481 | 481 |
482 /* special case for last picture */ | |
483 if (buf_size == 0) { | |
484 return 0; | |
485 } | |
486 | |
487 s->bytestream_start= | 482 s->bytestream_start= |
488 s->bytestream= buf; | 483 s->bytestream= buf; |
489 s->bytestream_end= buf + buf_size; | 484 s->bytestream_end= buf + buf_size; |
490 | 485 |
491 /* check signature */ | 486 /* check signature */ |