comparison libamr.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 7a463923ecd1
children 54bc8a2727b0
comparison
equal deleted inserted replaced
9006:37ac731fe32c 9007:043574c5c153
154 Speech_Encode_FrameState *enstate; 154 Speech_Encode_FrameState *enstate;
155 sid_syncState *sidstate; 155 sid_syncState *sidstate;
156 enum TXFrameType tx_frametype; 156 enum TXFrameType tx_frametype;
157 } AMRContext; 157 } AMRContext;
158 158
159 static int amr_nb_decode_init(AVCodecContext * avctx) 159 static av_cold int amr_nb_decode_init(AVCodecContext * avctx)
160 { 160 {
161 AMRContext *s = avctx->priv_data; 161 AMRContext *s = avctx->priv_data;
162 162
163 s->frameCount=0; 163 s->frameCount=0;
164 s->speech_decoder_state=NULL; 164 s->speech_decoder_state=NULL;
182 } 182 }
183 183
184 return 0; 184 return 0;
185 } 185 }
186 186
187 static int amr_nb_encode_init(AVCodecContext * avctx) 187 static av_cold int amr_nb_encode_init(AVCodecContext * avctx)
188 { 188 {
189 AMRContext *s = avctx->priv_data; 189 AMRContext *s = avctx->priv_data;
190 190
191 s->frameCount=0; 191 s->frameCount=0;
192 s->speech_decoder_state=NULL; 192 s->speech_decoder_state=NULL;
223 } 223 }
224 224
225 return 0; 225 return 0;
226 } 226 }
227 227
228 static int amr_nb_encode_close(AVCodecContext * avctx) 228 static av_cold int amr_nb_encode_close(AVCodecContext * avctx)
229 { 229 {
230 AMRContext *s = avctx->priv_data; 230 AMRContext *s = avctx->priv_data;
231 231
232 Speech_Encode_Frame_exit(&s->enstate); 232 Speech_Encode_Frame_exit(&s->enstate);
233 sid_sync_exit (&s->sidstate); 233 sid_sync_exit (&s->sidstate);
234 av_freep(&avctx->coded_frame); 234 av_freep(&avctx->coded_frame);
235 return 0; 235 return 0;
236 } 236 }
237 237
238 static int amr_nb_decode_close(AVCodecContext * avctx) 238 static av_cold int amr_nb_decode_close(AVCodecContext * avctx)
239 { 239 {
240 AMRContext *s = avctx->priv_data; 240 AMRContext *s = avctx->priv_data;
241 241
242 Speech_Decode_Frame_exit(&s->speech_decoder_state); 242 Speech_Decode_Frame_exit(&s->speech_decoder_state);
243 return 0; 243 return 0;
360 void * decState; 360 void * decState;
361 int *enstate; 361 int *enstate;
362 int enc_bitrate; 362 int enc_bitrate;
363 } AMRContext; 363 } AMRContext;
364 364
365 static int amr_nb_decode_init(AVCodecContext * avctx) 365 static av_cold int amr_nb_decode_init(AVCodecContext * avctx)
366 { 366 {
367 AMRContext *s = avctx->priv_data; 367 AMRContext *s = avctx->priv_data;
368 368
369 s->frameCount=0; 369 s->frameCount=0;
370 s->decState=Decoder_Interface_init(); 370 s->decState=Decoder_Interface_init();
383 } 383 }
384 384
385 return 0; 385 return 0;
386 } 386 }
387 387
388 static int amr_nb_encode_init(AVCodecContext * avctx) 388 static av_cold int amr_nb_encode_init(AVCodecContext * avctx)
389 { 389 {
390 AMRContext *s = avctx->priv_data; 390 AMRContext *s = avctx->priv_data;
391 391
392 s->frameCount=0; 392 s->frameCount=0;
393 393
420 } 420 }
421 421
422 return 0; 422 return 0;
423 } 423 }
424 424
425 static int amr_nb_decode_close(AVCodecContext * avctx) 425 static av_cold int amr_nb_decode_close(AVCodecContext * avctx)
426 { 426 {
427 AMRContext *s = avctx->priv_data; 427 AMRContext *s = avctx->priv_data;
428 428
429 Decoder_Interface_exit(s->decState); 429 Decoder_Interface_exit(s->decState);
430 return 0; 430 return 0;
431 } 431 }
432 432
433 static int amr_nb_encode_close(AVCodecContext * avctx) 433 static av_cold int amr_nb_encode_close(AVCodecContext * avctx)
434 { 434 {
435 AMRContext *s = avctx->priv_data; 435 AMRContext *s = avctx->priv_data;
436 436
437 Encoder_Interface_exit(s->enstate); 437 Encoder_Interface_exit(s->enstate);
438 av_freep(&avctx->coded_frame); 438 av_freep(&avctx->coded_frame);