summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorRodger Combs <rodger.combs@gmail.com>2015-10-07 21:09:26 -0500
committerRodger Combs <rodger.combs@gmail.com>2015-10-10 10:41:10 -0500
commit0d53a6f5b4f5ccebe3f7b4d8cfd440e07affa509 (patch)
treeeda082c1994fc251408a6c094c74f0a326a7f878 /libavcodec
parent5740dc27e1a633b636ae37ae1f7a2ab71a060486 (diff)
lavc: move bitstream filter args to the bsf ctx
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/avcodec.h5
-rw-r--r--libavcodec/bitstream_filter.c5
-rw-r--r--libavcodec/version.h4
3 files changed, 10 insertions, 4 deletions
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, \