Mercurial > libavcodec.hg
comparison truemotion2.c @ 10399:136334ad62b3 libavcodec
Release frame after decoding is done
author | kostya |
---|---|
date | Wed, 14 Oct 2009 05:28:24 +0000 |
parents | d7ed9dcc78e3 |
children | 8a137661f31e |
comparison
equal
deleted
inserted
replaced
10398:11b685acd280 | 10399:136334ad62b3 |
---|---|
843 return 0; | 843 return 0; |
844 } | 844 } |
845 | 845 |
846 static av_cold int decode_end(AVCodecContext *avctx){ | 846 static av_cold int decode_end(AVCodecContext *avctx){ |
847 TM2Context * const l = avctx->priv_data; | 847 TM2Context * const l = avctx->priv_data; |
848 AVFrame *pic = &l->pic; | |
848 int i; | 849 int i; |
849 | 850 |
850 if(l->last) | 851 if(l->last) |
851 av_free(l->last); | 852 av_free(l->last); |
852 if(l->clast) | 853 if(l->clast) |
860 av_free(l->V1); | 861 av_free(l->V1); |
861 av_free(l->Y2); | 862 av_free(l->Y2); |
862 av_free(l->U2); | 863 av_free(l->U2); |
863 av_free(l->V2); | 864 av_free(l->V2); |
864 } | 865 } |
866 | |
867 if (pic->data[0]) | |
868 avctx->release_buffer(avctx, pic); | |
869 av_freep(&l->pic); | |
870 | |
865 return 0; | 871 return 0; |
866 } | 872 } |
867 | 873 |
868 AVCodec truemotion2_decoder = { | 874 AVCodec truemotion2_decoder = { |
869 "truemotion2", | 875 "truemotion2", |