Mercurial > libavcodec.hg
comparison mpegaudioenc.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 | 94c3f01c243c |
children | 5b3acf9fd50a |
comparison
equal
deleted
inserted
replaced
6516:dbb902bb2347 | 6517:48759bfbd073 |
---|---|
59 //#define USE_FLOATS | 59 //#define USE_FLOATS |
60 | 60 |
61 #include "mpegaudiodata.h" | 61 #include "mpegaudiodata.h" |
62 #include "mpegaudiotab.h" | 62 #include "mpegaudiotab.h" |
63 | 63 |
64 static int MPA_encode_init(AVCodecContext *avctx) | 64 static av_cold int MPA_encode_init(AVCodecContext *avctx) |
65 { | 65 { |
66 MpegAudioContext *s = avctx->priv_data; | 66 MpegAudioContext *s = avctx->priv_data; |
67 int freq = avctx->sample_rate; | 67 int freq = avctx->sample_rate; |
68 int bitrate = avctx->bit_rate; | 68 int bitrate = avctx->bit_rate; |
69 int channels = avctx->channels; | 69 int channels = avctx->channels; |
779 | 779 |
780 s->nb_samples += MPA_FRAME_SIZE; | 780 s->nb_samples += MPA_FRAME_SIZE; |
781 return pbBufPtr(&s->pb) - s->pb.buf; | 781 return pbBufPtr(&s->pb) - s->pb.buf; |
782 } | 782 } |
783 | 783 |
784 static int MPA_encode_close(AVCodecContext *avctx) | 784 static av_cold int MPA_encode_close(AVCodecContext *avctx) |
785 { | 785 { |
786 av_freep(&avctx->coded_frame); | 786 av_freep(&avctx->coded_frame); |
787 return 0; | 787 return 0; |
788 } | 788 } |
789 | 789 |