comparison bfi.c @ 9007:043574c5c153 libavcodec

Add missing av_cold in static init/close functions. Patch by Daniel Verkamp daniel at drv dot nu.
author stefano
date Sun, 22 Feb 2009 13:48:55 +0000
parents e3693cef784a
children 54bc8a2727b0
comparison
equal deleted inserted replaced
9006:37ac731fe32c 9007:043574c5c153
34 AVCodecContext *avctx; 34 AVCodecContext *avctx;
35 AVFrame frame; 35 AVFrame frame;
36 uint8_t *dst; 36 uint8_t *dst;
37 } BFIContext; 37 } BFIContext;
38 38
39 static int bfi_decode_init(AVCodecContext * avctx) 39 static av_cold int bfi_decode_init(AVCodecContext * avctx)
40 { 40 {
41 BFIContext *bfi = avctx->priv_data; 41 BFIContext *bfi = avctx->priv_data;
42 avctx->pix_fmt = PIX_FMT_PAL8; 42 avctx->pix_fmt = PIX_FMT_PAL8;
43 bfi->dst = av_mallocz(avctx->width * avctx->height); 43 bfi->dst = av_mallocz(avctx->width * avctx->height);
44 return 0; 44 return 0;
159 *data_size = sizeof(AVFrame); 159 *data_size = sizeof(AVFrame);
160 *(AVFrame *) data = bfi->frame; 160 *(AVFrame *) data = bfi->frame;
161 return buf_size; 161 return buf_size;
162 } 162 }
163 163
164 static int bfi_decode_close(AVCodecContext * avctx) 164 static av_cold int bfi_decode_close(AVCodecContext * avctx)
165 { 165 {
166 BFIContext *bfi = avctx->priv_data; 166 BFIContext *bfi = avctx->priv_data;
167 if (bfi->frame.data[0]) 167 if (bfi->frame.data[0])
168 avctx->release_buffer(avctx, &bfi->frame); 168 avctx->release_buffer(avctx, &bfi->frame);
169 av_free(bfi->dst); 169 av_free(bfi->dst);