comparison ptx.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 ce0378d4c06c
children 6eeb19edcee3
comparison
equal deleted inserted replaced
6516:dbb902bb2347 6517:48759bfbd073
23 23
24 typedef struct PTXContext { 24 typedef struct PTXContext {
25 AVFrame picture; 25 AVFrame picture;
26 } PTXContext; 26 } PTXContext;
27 27
28 static int ptx_init(AVCodecContext *avctx) { 28 static av_cold int ptx_init(AVCodecContext *avctx) {
29 PTXContext *s = avctx->priv_data; 29 PTXContext *s = avctx->priv_data;
30 30
31 avcodec_get_frame_defaults(&s->picture); 31 avcodec_get_frame_defaults(&s->picture);
32 avctx->coded_frame= &s->picture; 32 avctx->coded_frame= &s->picture;
33 33
92 *data_size = sizeof(AVPicture); 92 *data_size = sizeof(AVPicture);
93 93
94 return offset + w*h*bytes_per_pixel; 94 return offset + w*h*bytes_per_pixel;
95 } 95 }
96 96
97 static int ptx_end(AVCodecContext *avctx) { 97 static av_cold int ptx_end(AVCodecContext *avctx) {
98 PTXContext *s = avctx->priv_data; 98 PTXContext *s = avctx->priv_data;
99 99
100 if(s->picture.data[0]) 100 if(s->picture.data[0])
101 avctx->release_buffer(avctx, &s->picture); 101 avctx->release_buffer(avctx, &s->picture);
102 102