changeset 5630:327f714d69c0 libavcodec

add a close function to bitstream filter
author benoit
date Tue, 04 Sep 2007 06:48:22 +0000
parents 7e5ebda833e9
children 550e37ec2204
files avcodec.h bitstream_filter.c
diffstat 2 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/avcodec.h	Mon Sep 03 08:46:24 2007 +0000
+++ b/avcodec.h	Tue Sep 04 06:48:22 2007 +0000
@@ -33,8 +33,8 @@
 #define AV_STRINGIFY(s)         AV_TOSTRING(s)
 #define AV_TOSTRING(s) #s
 
-#define LIBAVCODEC_VERSION_INT  ((51<<16)+(42<<8)+0)
-#define LIBAVCODEC_VERSION      51.42.0
+#define LIBAVCODEC_VERSION_INT  ((51<<16)+(43<<8)+0)
+#define LIBAVCODEC_VERSION      51.43.0
 #define LIBAVCODEC_BUILD        LIBAVCODEC_VERSION_INT
 
 #define LIBAVCODEC_IDENT        "Lavc" AV_STRINGIFY(LIBAVCODEC_VERSION)
@@ -2798,6 +2798,7 @@
                   AVCodecContext *avctx, const char *args,
                   uint8_t **poutbuf, int *poutbuf_size,
                   const uint8_t *buf, int buf_size, int keyframe);
+    void (*close)(AVBitStreamFilterContext *bsfc);
     struct AVBitStreamFilter *next;
 } AVBitStreamFilter;
 
--- a/bitstream_filter.c	Mon Sep 03 08:46:24 2007 +0000
+++ b/bitstream_filter.c	Tue Sep 04 06:48:22 2007 +0000
@@ -43,6 +43,8 @@
 }
 
 void av_bitstream_filter_close(AVBitStreamFilterContext *bsfc){
+    if(bsfc->filter->close)
+        bsfc->filter->close(bsfc);
     av_freep(&bsfc->priv_data);
     av_parser_close(bsfc->parser);
     av_free(bsfc);