Mercurial > libavcodec.hg
comparison snow.c @ 10806:e58e93f04279 libavcodec
Snow : release buffers allocated using avctx->get_buffer.
author | jai_menon |
---|---|
date | Fri, 08 Jan 2010 05:09:17 +0000 |
parents | 328e2a3171d2 |
children | 35ced8a13d7d |
comparison
equal
deleted
inserted
replaced
10805:55a1d93c534c | 10806:e58e93f04279 |
---|---|
2717 | 2717 |
2718 av_freep(&b->x_coeff); | 2718 av_freep(&b->x_coeff); |
2719 } | 2719 } |
2720 } | 2720 } |
2721 } | 2721 } |
2722 if (s->mconly_picture.data[0]) | |
2723 s->avctx->release_buffer(s->avctx, &s->mconly_picture); | |
2724 if (s->current_picture.data[0]) | |
2725 s->avctx->release_buffer(s->avctx, &s->current_picture); | |
2722 } | 2726 } |
2723 | 2727 |
2724 static av_cold int decode_init(AVCodecContext *avctx) | 2728 static av_cold int decode_init(AVCodecContext *avctx) |
2725 { | 2729 { |
2726 avctx->pix_fmt= PIX_FMT_YUV420P; | 2730 avctx->pix_fmt= PIX_FMT_YUV420P; |
4679 static av_cold int encode_end(AVCodecContext *avctx) | 4683 static av_cold int encode_end(AVCodecContext *avctx) |
4680 { | 4684 { |
4681 SnowContext *s = avctx->priv_data; | 4685 SnowContext *s = avctx->priv_data; |
4682 | 4686 |
4683 common_end(s); | 4687 common_end(s); |
4688 if (s->input_picture.data[0]) | |
4689 avctx->release_buffer(avctx, &s->input_picture); | |
4684 av_free(avctx->stats_out); | 4690 av_free(avctx->stats_out); |
4685 | 4691 |
4686 return 0; | 4692 return 0; |
4687 } | 4693 } |
4688 | 4694 |