comparison nuv.c @ 6517:48759bfbd073 libavcodec

Apply 'cold' attribute to init/uninit functions in libavcodec
author zuxy
date Fri, 21 Mar 2008 03:11:20 +0000
parents 930ac362be5a
children a4104482ceef
comparison
equal deleted inserted replaced
6516:dbb902bb2347 6517:48759bfbd073
234 *picture = c->pic; 234 *picture = c->pic;
235 *data_size = sizeof(AVFrame); 235 *data_size = sizeof(AVFrame);
236 return orig_size; 236 return orig_size;
237 } 237 }
238 238
239 static int decode_init(AVCodecContext *avctx) { 239 static av_cold int decode_init(AVCodecContext *avctx) {
240 NuvContext *c = avctx->priv_data; 240 NuvContext *c = avctx->priv_data;
241 avctx->pix_fmt = PIX_FMT_YUV420P; 241 avctx->pix_fmt = PIX_FMT_YUV420P;
242 c->pic.data[0] = NULL; 242 c->pic.data[0] = NULL;
243 c->decomp_buf = NULL; 243 c->decomp_buf = NULL;
244 c->quality = -1; 244 c->quality = -1;
251 if (!codec_reinit(avctx, avctx->width, avctx->height, -1)) 251 if (!codec_reinit(avctx, avctx->width, avctx->height, -1))
252 return 1; 252 return 1;
253 return 0; 253 return 0;
254 } 254 }
255 255
256 static int decode_end(AVCodecContext *avctx) { 256 static av_cold int decode_end(AVCodecContext *avctx) {
257 NuvContext *c = avctx->priv_data; 257 NuvContext *c = avctx->priv_data;
258 av_freep(&c->decomp_buf); 258 av_freep(&c->decomp_buf);
259 if (c->pic.data[0]) 259 if (c->pic.data[0])
260 avctx->release_buffer(avctx, &c->pic); 260 avctx->release_buffer(avctx, &c->pic);
261 return 0; 261 return 0;