Commit 0d53a6f5 authored by Rodger Combs's avatar Rodger Combs

lavc: move bitstream filter args to the bsf ctx

parent 5740dc27
...@@ -5026,6 +5026,11 @@ typedef struct AVBitStreamFilterContext { ...@@ -5026,6 +5026,11 @@ typedef struct AVBitStreamFilterContext {
struct AVBitStreamFilter *filter; struct AVBitStreamFilter *filter;
AVCodecParserContext *parser; AVCodecParserContext *parser;
struct AVBitStreamFilterContext *next; 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; } AVBitStreamFilterContext;
......
...@@ -73,6 +73,7 @@ void av_bitstream_filter_close(AVBitStreamFilterContext *bsfc) ...@@ -73,6 +73,7 @@ void av_bitstream_filter_close(AVBitStreamFilterContext *bsfc)
if (bsfc->filter->close) if (bsfc->filter->close)
bsfc->filter->close(bsfc); bsfc->filter->close(bsfc);
av_freep(&bsfc->priv_data); av_freep(&bsfc->priv_data);
av_freep(&bsfc->args);
av_parser_close(bsfc->parser); av_parser_close(bsfc->parser);
av_free(bsfc); av_free(bsfc);
} }
...@@ -84,6 +85,6 @@ int av_bitstream_filter_filter(AVBitStreamFilterContext *bsfc, ...@@ -84,6 +85,6 @@ int av_bitstream_filter_filter(AVBitStreamFilterContext *bsfc,
{ {
*poutbuf = (uint8_t *)buf; *poutbuf = (uint8_t *)buf;
*poutbuf_size = buf_size; *poutbuf_size = buf_size;
return bsfc->filter->filter(bsfc, avctx, args, poutbuf, poutbuf_size, return bsfc->filter->filter(bsfc, avctx, args ? args : bsfc->args,
buf, buf_size, keyframe); poutbuf, poutbuf_size, buf, buf_size, keyframe);
} }
...@@ -29,8 +29,8 @@ ...@@ -29,8 +29,8 @@
#include "libavutil/version.h" #include "libavutil/version.h"
#define LIBAVCODEC_VERSION_MAJOR 57 #define LIBAVCODEC_VERSION_MAJOR 57
#define LIBAVCODEC_VERSION_MINOR 4 #define LIBAVCODEC_VERSION_MINOR 5
#define LIBAVCODEC_VERSION_MICRO 101 #define LIBAVCODEC_VERSION_MICRO 100
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
LIBAVCODEC_VERSION_MINOR, \ LIBAVCODEC_VERSION_MINOR, \
......
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