comparison sonic.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 cffdb71f0930
children f282270c589f
comparison
equal deleted inserted replaced
6516:dbb902bb2347 6517:48759bfbd073
501 case 8000: return 8; 501 case 8000: return 8;
502 } 502 }
503 return -1; 503 return -1;
504 } 504 }
505 505
506 static int sonic_encode_init(AVCodecContext *avctx) 506 static av_cold int sonic_encode_init(AVCodecContext *avctx)
507 { 507 {
508 SonicContext *s = avctx->priv_data; 508 SonicContext *s = avctx->priv_data;
509 PutBitContext pb; 509 PutBitContext pb;
510 int i, version = 0; 510 int i, version = 0;
511 511
606 avctx->frame_size = s->block_align*s->downsampling; 606 avctx->frame_size = s->block_align*s->downsampling;
607 607
608 return 0; 608 return 0;
609 } 609 }
610 610
611 static int sonic_encode_close(AVCodecContext *avctx) 611 static av_cold int sonic_encode_close(AVCodecContext *avctx)
612 { 612 {
613 SonicContext *s = avctx->priv_data; 613 SonicContext *s = avctx->priv_data;
614 int i; 614 int i;
615 615
616 av_freep(&avctx->coded_frame); 616 av_freep(&avctx->coded_frame);
749 return (put_bits_count(&pb)+7)/8; 749 return (put_bits_count(&pb)+7)/8;
750 } 750 }
751 #endif //CONFIG_ENCODERS 751 #endif //CONFIG_ENCODERS
752 752
753 #ifdef CONFIG_DECODERS 753 #ifdef CONFIG_DECODERS
754 static int sonic_decode_init(AVCodecContext *avctx) 754 static av_cold int sonic_decode_init(AVCodecContext *avctx)
755 { 755 {
756 SonicContext *s = avctx->priv_data; 756 SonicContext *s = avctx->priv_data;
757 GetBitContext gb; 757 GetBitContext gb;
758 int i, version; 758 int i, version;
759 759
829 s->int_samples = av_mallocz(4* s->frame_size); 829 s->int_samples = av_mallocz(4* s->frame_size);
830 830
831 return 0; 831 return 0;
832 } 832 }
833 833
834 static int sonic_decode_close(AVCodecContext *avctx) 834 static av_cold int sonic_decode_close(AVCodecContext *avctx)
835 { 835 {
836 SonicContext *s = avctx->priv_data; 836 SonicContext *s = avctx->priv_data;
837 int i; 837 int i;
838 838
839 av_free(s->int_samples); 839 av_free(s->int_samples);