[FFmpeg-cvslog] r20228 - in trunk/libavcodec: v210dec.c v210x.c

reimar subversion
Tue Oct 13 20:31:22 CEST 2009


Author: reimar
Date: Tue Oct 13 20:31:22 2009
New Revision: 20228

Log:
Call release_buffer on close for v210dec and v210x

Modified:
   trunk/libavcodec/v210dec.c
   trunk/libavcodec/v210x.c

Modified: trunk/libavcodec/v210dec.c
==============================================================================
--- trunk/libavcodec/v210dec.c	Tue Oct 13 20:28:37 2009	(r20227)
+++ trunk/libavcodec/v210dec.c	Tue Oct 13 20:31:22 2009	(r20228)
@@ -114,6 +114,9 @@ static int decode_frame(AVCodecContext *
 
 static av_cold int decode_close(AVCodecContext *avctx)
 {
+    AVFrame *pic = avctx->coded_frame;
+    if (pic->data[0])
+        avctx->release_buffer(avctx, pic);
     av_freep(&avctx->coded_frame);
 
     return 0;

Modified: trunk/libavcodec/v210x.c
==============================================================================
--- trunk/libavcodec/v210x.c	Tue Oct 13 20:28:37 2009	(r20227)
+++ trunk/libavcodec/v210x.c	Tue Oct 13 20:31:22 2009	(r20228)
@@ -124,6 +124,16 @@ static int decode_frame(AVCodecContext *
     return avpkt->size;
 }
 
+static av_cold int decode_close(AVCodecContext *avctx)
+{
+    AVFrame *pic = avctx->coded_frame;
+    if (pic->data[0])
+        avctx->release_buffer(avctx, pic);
+    av_freep(&avctx->coded_frame);
+
+    return 0;
+}
+
 AVCodec v210x_decoder = {
     "v210x",
     CODEC_TYPE_VIDEO,
@@ -131,7 +141,7 @@ AVCodec v210x_decoder = {
     0,
     decode_init,
     NULL,
-    NULL,
+    decode_close,
     decode_frame,
     CODEC_CAP_DR1,
 };



More information about the ffmpeg-cvslog mailing list