summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenoit Fouet <benoit.fouet@free.fr>2007-09-04 06:48:22 +0000
committerBenoit Fouet <benoit.fouet@free.fr>2007-09-04 06:48:22 +0000
commit0a1a0a805a18f2024de45359baea7c36d4a343d6 (patch)
treec79d5fa5941a8a3ad48c67d688205dfd82b4dd7c
parent5f2cbb53b439ae332a5a0cbb19d5862f7bac1646 (diff)
add a close function to bitstream filter
Originally committed as revision 10288 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/avcodec.h5
-rw-r--r--libavcodec/bitstream_filter.c2
2 files changed, 5 insertions, 2 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index f81a933be2..53f24f25d0 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -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 @@ typedef struct AVBitStreamFilter {
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;
diff --git a/libavcodec/bitstream_filter.c b/libavcodec/bitstream_filter.c
index 2a72a5063d..97fbd776d1 100644
--- a/libavcodec/bitstream_filter.c
+++ b/libavcodec/bitstream_filter.c
@@ -43,6 +43,8 @@ AVBitStreamFilterContext *av_bitstream_filter_init(const char *name){
}
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);