comparison pnm.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
163 AVFrame *picture = data; 163 AVFrame *picture = data;
164 AVFrame * const p= (AVFrame*)&s->picture; 164 AVFrame * const p= (AVFrame*)&s->picture;
165 int i, n, linesize, h; 165 int i, n, linesize, h;
166 unsigned char *ptr; 166 unsigned char *ptr;
167 167
168 /* special case for last picture */
169 if (buf_size == 0) {
170 return 0;
171 }
172
173 s->bytestream_start= 168 s->bytestream_start=
174 s->bytestream= buf; 169 s->bytestream= buf;
175 s->bytestream_end= buf + buf_size; 170 s->bytestream_end= buf + buf_size;
176 171
177 if(pnm_decode_header(avctx, s) < 0) 172 if(pnm_decode_header(avctx, s) < 0)