lavc: move bitstream filter args to the bsf ctx
authorRodger Combs <rodger.combs@gmail.com>
Thu, 8 Oct 2015 02:09:26 +0000 (21:09 -0500)
committerRodger Combs <rodger.combs@gmail.com>
Sat, 10 Oct 2015 15:41:10 +0000 (10:41 -0500)
libavcodec/avcodec.h
libavcodec/bitstream_filter.c
libavcodec/version.h

index ff70d254af3211f24036da9eb984648f646f033c..22a68fbfd92174187b7ae347af934a937ce4bbc8 100644 (file)
@@ -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;
 
 
index a4e437df5fd78c17782666e2dc91ac1b43d60d1f..fb690b68217739b4fab86b6c2f33f7c9759aca00 100644 (file)
@@ -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);
 }
index a89ad918725fcf1bddff6c1b133f888bd310e2e5..c7fc1f199f69eaa19fac9ef1e1070890236cc72e 100644 (file)
@@ -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, \