From 0d53a6f5b4f5ccebe3f7b4d8cfd440e07affa509 Mon Sep 17 00:00:00 2001 From: Rodger Combs Date: Wed, 7 Oct 2015 21:09:26 -0500 Subject: lavc: move bitstream filter args to the bsf ctx --- libavcodec/avcodec.h | 5 +++++ libavcodec/bitstream_filter.c | 5 +++-- libavcodec/version.h | 4 ++-- 3 files changed, 10 insertions(+), 4 deletions(-) (limited to 'libavcodec') diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index ff70d254af..22a68fbfd9 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -5026,6 +5026,11 @@ typedef struct AVBitStreamFilterContext { struct AVBitStreamFilter *filter; AVCodecParserContext *parser; struct AVBitStreamFilterContext *next; + /** + * Internal default arguments, used if NULL is passed to av_bitstream_filter_filter(). + * Not for access by library users. + */ + char *args; } AVBitStreamFilterContext; diff --git a/libavcodec/bitstream_filter.c b/libavcodec/bitstream_filter.c index a4e437df5f..fb690b6821 100644 --- a/libavcodec/bitstream_filter.c +++ b/libavcodec/bitstream_filter.c @@ -73,6 +73,7 @@ void av_bitstream_filter_close(AVBitStreamFilterContext *bsfc) if (bsfc->filter->close) bsfc->filter->close(bsfc); av_freep(&bsfc->priv_data); + av_freep(&bsfc->args); av_parser_close(bsfc->parser); av_free(bsfc); } @@ -84,6 +85,6 @@ int av_bitstream_filter_filter(AVBitStreamFilterContext *bsfc, { *poutbuf = (uint8_t *)buf; *poutbuf_size = buf_size; - return bsfc->filter->filter(bsfc, avctx, args, poutbuf, poutbuf_size, - buf, buf_size, keyframe); + return bsfc->filter->filter(bsfc, avctx, args ? args : bsfc->args, + poutbuf, poutbuf_size, buf, buf_size, keyframe); } diff --git a/libavcodec/version.h b/libavcodec/version.h index a89ad91872..c7fc1f199f 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -29,8 +29,8 @@ #include "libavutil/version.h" #define LIBAVCODEC_VERSION_MAJOR 57 -#define LIBAVCODEC_VERSION_MINOR 4 -#define LIBAVCODEC_VERSION_MICRO 101 +#define LIBAVCODEC_VERSION_MINOR 5 +#define LIBAVCODEC_VERSION_MICRO 100 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ LIBAVCODEC_VERSION_MINOR, \ -- cgit v1.2.3