Mercurial > libavcodec.hg
comparison ffv1.c @ 3283:c53ef1f63575 libavcodec
memory leak.
author | lorenm |
---|---|
date | Fri, 28 Apr 2006 23:16:42 +0000 |
parents | 6baa0bfee0b8 |
children | 0082fb8c77b6 |
comparison
equal
deleted
inserted
replaced
3282:ecc93139021c | 3283:c53ef1f63575 |
---|---|
686 flush_put_bits(&f->pb); //nicer padding FIXME | 686 flush_put_bits(&f->pb); //nicer padding FIXME |
687 return used_count + (put_bits_count(&f->pb)+7)/8; | 687 return used_count + (put_bits_count(&f->pb)+7)/8; |
688 } | 688 } |
689 } | 689 } |
690 | 690 |
691 static void common_end(FFV1Context *s){ | 691 static int common_end(AVCodecContext *avctx){ |
692 FFV1Context *s = avctx->priv_data; | |
692 int i; | 693 int i; |
693 | 694 |
694 for(i=0; i<s->plane_count; i++){ | 695 for(i=0; i<s->plane_count; i++){ |
695 PlaneContext *p= &s->plane[i]; | 696 PlaneContext *p= &s->plane[i]; |
696 | 697 |
697 av_freep(&p->state); | 698 av_freep(&p->state); |
698 } | 699 } |
699 } | |
700 | |
701 static int encode_end(AVCodecContext *avctx) | |
702 { | |
703 FFV1Context *s = avctx->priv_data; | |
704 | |
705 common_end(s); | |
706 | 700 |
707 return 0; | 701 return 0; |
708 } | 702 } |
709 | 703 |
710 static inline void decode_line(FFV1Context *s, int w, int_fast16_t *sample[2], int plane_index, int bits){ | 704 static inline void decode_line(FFV1Context *s, int w, int_fast16_t *sample[2], int plane_index, int bits){ |
1016 CODEC_TYPE_VIDEO, | 1010 CODEC_TYPE_VIDEO, |
1017 CODEC_ID_FFV1, | 1011 CODEC_ID_FFV1, |
1018 sizeof(FFV1Context), | 1012 sizeof(FFV1Context), |
1019 decode_init, | 1013 decode_init, |
1020 NULL, | 1014 NULL, |
1021 NULL, | 1015 common_end, |
1022 decode_frame, | 1016 decode_frame, |
1023 CODEC_CAP_DR1 /*| CODEC_CAP_DRAW_HORIZ_BAND*/, | 1017 CODEC_CAP_DR1 /*| CODEC_CAP_DRAW_HORIZ_BAND*/, |
1024 NULL | 1018 NULL |
1025 }; | 1019 }; |
1026 | 1020 |
1030 CODEC_TYPE_VIDEO, | 1024 CODEC_TYPE_VIDEO, |
1031 CODEC_ID_FFV1, | 1025 CODEC_ID_FFV1, |
1032 sizeof(FFV1Context), | 1026 sizeof(FFV1Context), |
1033 encode_init, | 1027 encode_init, |
1034 encode_frame, | 1028 encode_frame, |
1035 encode_end, | 1029 common_end, |
1036 }; | 1030 }; |
1037 #endif | 1031 #endif |