comparison vcr1.c @ 2453:f67b63ed036d libavcodec

avoid buf_size == 0 checks in every decoder
author michael
date Sun, 23 Jan 2005 18:09:06 +0000
parents 141a9539e270
children e25782262d7d
comparison
equal deleted inserted replaced
2452:73a66a4a6ab4 2453:f67b63ed036d
42 VCR1Context * const a = avctx->priv_data; 42 VCR1Context * const a = avctx->priv_data;
43 AVFrame *picture = data; 43 AVFrame *picture = data;
44 AVFrame * const p= (AVFrame*)&a->picture; 44 AVFrame * const p= (AVFrame*)&a->picture;
45 uint8_t *bytestream= buf; 45 uint8_t *bytestream= buf;
46 int i, x, y; 46 int i, x, y;
47
48 /* special case for last picture */
49 if (buf_size == 0) {
50 return 0;
51 }
52 47
53 if(p->data[0]) 48 if(p->data[0])
54 avctx->release_buffer(avctx, p); 49 avctx->release_buffer(avctx, p);
55 50
56 p->reference= 0; 51 p->reference= 0;