Commit b279e544 authored by benoit's avatar benoit

add a close function to bitstream filter


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@10288 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 896671e9
...@@ -33,8 +33,8 @@ ...@@ -33,8 +33,8 @@
#define AV_STRINGIFY(s) AV_TOSTRING(s) #define AV_STRINGIFY(s) AV_TOSTRING(s)
#define AV_TOSTRING(s) #s #define AV_TOSTRING(s) #s
#define LIBAVCODEC_VERSION_INT ((51<<16)+(42<<8)+0) #define LIBAVCODEC_VERSION_INT ((51<<16)+(43<<8)+0)
#define LIBAVCODEC_VERSION 51.42.0 #define LIBAVCODEC_VERSION 51.43.0
#define LIBAVCODEC_BUILD LIBAVCODEC_VERSION_INT #define LIBAVCODEC_BUILD LIBAVCODEC_VERSION_INT
#define LIBAVCODEC_IDENT "Lavc" AV_STRINGIFY(LIBAVCODEC_VERSION) #define LIBAVCODEC_IDENT "Lavc" AV_STRINGIFY(LIBAVCODEC_VERSION)
...@@ -2798,6 +2798,7 @@ typedef struct AVBitStreamFilter { ...@@ -2798,6 +2798,7 @@ typedef struct AVBitStreamFilter {
AVCodecContext *avctx, const char *args, AVCodecContext *avctx, const char *args,
uint8_t **poutbuf, int *poutbuf_size, uint8_t **poutbuf, int *poutbuf_size,
const uint8_t *buf, int buf_size, int keyframe); const uint8_t *buf, int buf_size, int keyframe);
void (*close)(AVBitStreamFilterContext *bsfc);
struct AVBitStreamFilter *next; struct AVBitStreamFilter *next;
} AVBitStreamFilter; } AVBitStreamFilter;
......
...@@ -43,6 +43,8 @@ AVBitStreamFilterContext *av_bitstream_filter_init(const char *name){ ...@@ -43,6 +43,8 @@ AVBitStreamFilterContext *av_bitstream_filter_init(const char *name){
} }
void av_bitstream_filter_close(AVBitStreamFilterContext *bsfc){ void av_bitstream_filter_close(AVBitStreamFilterContext *bsfc){
if(bsfc->filter->close)
bsfc->filter->close(bsfc);
av_freep(&bsfc->priv_data); av_freep(&bsfc->priv_data);
av_parser_close(bsfc->parser); av_parser_close(bsfc->parser);
av_free(bsfc); av_free(bsfc);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment