Mercurial > libavcodec.hg
comparison mdec.c @ 2453:f67b63ed036d libavcodec
avoid buf_size == 0 checks in every decoder
author | michael |
---|---|
date | Sun, 23 Jan 2005 18:09:06 +0000 |
parents | 21f450be6cb5 |
children | 0d88e3f89379 |
comparison
equal
deleted
inserted
replaced
2452:73a66a4a6ab4 | 2453:f67b63ed036d |
---|---|
161 MDECContext * const a = avctx->priv_data; | 161 MDECContext * const a = avctx->priv_data; |
162 AVFrame *picture = data; | 162 AVFrame *picture = data; |
163 AVFrame * const p= (AVFrame*)&a->picture; | 163 AVFrame * const p= (AVFrame*)&a->picture; |
164 int i; | 164 int i; |
165 | 165 |
166 /* special case for last picture */ | |
167 if (buf_size == 0) { | |
168 return 0; | |
169 } | |
170 | |
171 if(p->data[0]) | 166 if(p->data[0]) |
172 avctx->release_buffer(avctx, p); | 167 avctx->release_buffer(avctx, p); |
173 | 168 |
174 p->reference= 0; | 169 p->reference= 0; |
175 if(avctx->get_buffer(avctx, p) < 0){ | 170 if(avctx->get_buffer(avctx, p) < 0){ |