comparison libgsm.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 20bea6a9950c
children 79984fdb1203
comparison
equal deleted inserted replaced
6516:dbb902bb2347 6517:48759bfbd073
33 // gsm.h misses some essential constants 33 // gsm.h misses some essential constants
34 #define GSM_BLOCK_SIZE 33 34 #define GSM_BLOCK_SIZE 33
35 #define GSM_MS_BLOCK_SIZE 65 35 #define GSM_MS_BLOCK_SIZE 65
36 #define GSM_FRAME_SIZE 160 36 #define GSM_FRAME_SIZE 160
37 37
38 static int libgsm_init(AVCodecContext *avctx) { 38 static av_cold int libgsm_init(AVCodecContext *avctx) {
39 if (avctx->channels > 1 || avctx->sample_rate != 8000 || avctx->bit_rate != 13000) 39 if (avctx->channels > 1 || avctx->sample_rate != 8000 || avctx->bit_rate != 13000)
40 return -1; 40 return -1;
41 41
42 avctx->priv_data = gsm_create(); 42 avctx->priv_data = gsm_create();
43 43
58 avctx->coded_frame->key_frame= 1; 58 avctx->coded_frame->key_frame= 1;
59 59
60 return 0; 60 return 0;
61 } 61 }
62 62
63 static int libgsm_close(AVCodecContext *avctx) { 63 static av_cold int libgsm_close(AVCodecContext *avctx) {
64 gsm_destroy(avctx->priv_data); 64 gsm_destroy(avctx->priv_data);
65 avctx->priv_data = NULL; 65 avctx->priv_data = NULL;
66 return 0; 66 return 0;
67 } 67 }
68 68