[FFmpeg-cvslog] r20231 - in trunk/libavcodec: indeo2.c loco.c qdrw.c truemotion2.c ulti.c wnv1.c xl.c
kostya
subversion
Wed Oct 14 07:28:24 CEST 2009
Author: kostya
Date: Wed Oct 14 07:28:24 2009
New Revision: 20231
Log:
Release frame after decoding is done
Modified:
trunk/libavcodec/indeo2.c
trunk/libavcodec/loco.c
trunk/libavcodec/qdrw.c
trunk/libavcodec/truemotion2.c
trunk/libavcodec/ulti.c
trunk/libavcodec/wnv1.c
trunk/libavcodec/xl.c
Modified: trunk/libavcodec/indeo2.c
==============================================================================
--- trunk/libavcodec/indeo2.c Tue Oct 13 22:48:51 2009 (r20230)
+++ trunk/libavcodec/indeo2.c Wed Oct 14 07:28:24 2009 (r20231)
@@ -213,6 +213,17 @@ static av_cold int ir2_decode_init(AVCod
return 0;
}
+static av_cold int ir2_decode_end(AVCodecContext *avctx){
+ Ir2Context * const ic = avctx->priv_data;
+ AVFrame *pic = &ic->picture;
+
+ if (pic->data[0])
+ avctx->release_buffer(avctx, pic);
+ av_freep(&ic->picture);
+
+ return 0;
+}
+
AVCodec indeo2_decoder = {
"indeo2",
CODEC_TYPE_VIDEO,
@@ -220,7 +231,7 @@ AVCodec indeo2_decoder = {
sizeof(Ir2Context),
ir2_decode_init,
NULL,
- NULL,
+ ir2_decode_end,
ir2_decode_frame,
CODEC_CAP_DR1,
.long_name = NULL_IF_CONFIG_SMALL("Intel Indeo 2"),
Modified: trunk/libavcodec/loco.c
==============================================================================
--- trunk/libavcodec/loco.c Tue Oct 13 22:48:51 2009 (r20230)
+++ trunk/libavcodec/loco.c Wed Oct 14 07:28:24 2009 (r20231)
@@ -275,6 +275,17 @@ static av_cold int decode_init(AVCodecCo
return 0;
}
+static av_cold int decode_end(AVCodecContext *avctx){
+ LOCOContext * const l = avctx->priv_data;
+ AVFrame *pic = &l->pic;
+
+ if (pic->data[0])
+ avctx->release_buffer(avctx, pic);
+ av_freep(&l->pic);
+
+ return 0;
+}
+
AVCodec loco_decoder = {
"loco",
CODEC_TYPE_VIDEO,
@@ -282,7 +293,7 @@ AVCodec loco_decoder = {
sizeof(LOCOContext),
decode_init,
NULL,
- NULL,
+ decode_end,
decode_frame,
CODEC_CAP_DR1,
.long_name = NULL_IF_CONFIG_SMALL("LOCO"),
Modified: trunk/libavcodec/qdrw.c
==============================================================================
--- trunk/libavcodec/qdrw.c Tue Oct 13 22:48:51 2009 (r20230)
+++ trunk/libavcodec/qdrw.c Wed Oct 14 07:28:24 2009 (r20231)
@@ -140,6 +140,17 @@ static av_cold int decode_init(AVCodecCo
return 0;
}
+static av_cold int decode_end(AVCodecContext *avctx){
+ QdrawContext * const a = avctx->priv_data;
+ AVFrame *pic = &a->pic;
+
+ if (pic->data[0])
+ avctx->release_buffer(avctx, pic);
+ av_freep(&a->pic);
+
+ return 0;
+}
+
AVCodec qdraw_decoder = {
"qdraw",
CODEC_TYPE_VIDEO,
@@ -147,7 +158,7 @@ AVCodec qdraw_decoder = {
sizeof(QdrawContext),
decode_init,
NULL,
- NULL,
+ decode_end,
decode_frame,
CODEC_CAP_DR1,
.long_name = NULL_IF_CONFIG_SMALL("Apple QuickDraw"),
Modified: trunk/libavcodec/truemotion2.c
==============================================================================
--- trunk/libavcodec/truemotion2.c Tue Oct 13 22:48:51 2009 (r20230)
+++ trunk/libavcodec/truemotion2.c Wed Oct 14 07:28:24 2009 (r20231)
@@ -845,6 +845,7 @@ static av_cold int decode_init(AVCodecCo
static av_cold int decode_end(AVCodecContext *avctx){
TM2Context * const l = avctx->priv_data;
+ AVFrame *pic = &l->pic;
int i;
if(l->last)
@@ -862,6 +863,11 @@ static av_cold int decode_end(AVCodecCon
av_free(l->U2);
av_free(l->V2);
}
+
+ if (pic->data[0])
+ avctx->release_buffer(avctx, pic);
+ av_freep(&l->pic);
+
return 0;
}
Modified: trunk/libavcodec/ulti.c
==============================================================================
--- trunk/libavcodec/ulti.c Tue Oct 13 22:48:51 2009 (r20230)
+++ trunk/libavcodec/ulti.c Wed Oct 14 07:28:24 2009 (r20231)
@@ -55,6 +55,17 @@ static av_cold int ulti_decode_init(AVCo
return 0;
}
+static av_cold int ulti_decode_end(AVCodecContext *avctx){
+ UltimotionDecodeContext *s = avctx->priv_data;
+ AVFrame *pic = &s->frame;
+
+ if (pic->data[0])
+ avctx->release_buffer(avctx, pic);
+ av_freep(&s->frame);
+
+ return 0;
+}
+
static const int block_coords[8] = // 4x4 block coords in 8x8 superblock
{ 0, 0, 0, 4, 4, 4, 4, 0};
@@ -401,7 +412,7 @@ AVCodec ulti_decoder = {
sizeof(UltimotionDecodeContext),
ulti_decode_init,
NULL,
- NULL,
+ ulti_decode_end,
ulti_decode_frame,
CODEC_CAP_DR1,
NULL,
Modified: trunk/libavcodec/wnv1.c
==============================================================================
--- trunk/libavcodec/wnv1.c Tue Oct 13 22:48:51 2009 (r20230)
+++ trunk/libavcodec/wnv1.c Wed Oct 14 07:28:24 2009 (r20231)
@@ -143,6 +143,17 @@ static av_cold int decode_init(AVCodecCo
return 0;
}
+static av_cold int decode_end(AVCodecContext *avctx){
+ WNV1Context * const l = avctx->priv_data;
+ AVFrame *pic = &l->pic;
+
+ if (pic->data[0])
+ avctx->release_buffer(avctx, pic);
+ av_freep(&l->pic);
+
+ return 0;
+}
+
AVCodec wnv1_decoder = {
"wnv1",
CODEC_TYPE_VIDEO,
@@ -150,7 +161,7 @@ AVCodec wnv1_decoder = {
sizeof(WNV1Context),
decode_init,
NULL,
- NULL,
+ decode_end,
decode_frame,
CODEC_CAP_DR1,
.long_name = NULL_IF_CONFIG_SMALL("Winnov WNV1"),
Modified: trunk/libavcodec/xl.c
==============================================================================
--- trunk/libavcodec/xl.c Tue Oct 13 22:48:51 2009 (r20230)
+++ trunk/libavcodec/xl.c Wed Oct 14 07:28:24 2009 (r20231)
@@ -128,6 +128,17 @@ static av_cold int decode_init(AVCodecCo
return 0;
}
+static av_cold int decode_end(AVCodecContext *avctx){
+ VideoXLContext * const a = avctx->priv_data;
+ AVFrame *pic = &a->pic;
+
+ if (pic->data[0])
+ avctx->release_buffer(avctx, pic);
+ av_freep(&a->pic);
+
+ return 0;
+}
+
AVCodec xl_decoder = {
"xl",
CODEC_TYPE_VIDEO,
@@ -135,7 +146,7 @@ AVCodec xl_decoder = {
sizeof(VideoXLContext),
decode_init,
NULL,
- NULL,
+ decode_end,
decode_frame,
CODEC_CAP_DR1,
.long_name = NULL_IF_CONFIG_SMALL("Miro VideoXL"),
More information about the ffmpeg-cvslog
mailing list