[FFmpeg-cvslog] lavc: move bitstream filter args to the bsf ctx

Rodger Combs git at videolan.org
Sat Oct 10 17:41:50 CEST 2015


ffmpeg | branch: master | Rodger Combs <rodger.combs at gmail.com> | Wed Oct  7 21:09:26 2015 -0500| [0d53a6f5b4f5ccebe3f7b4d8cfd440e07affa509] | committer: Rodger Combs

lavc: move bitstream filter args to the bsf ctx

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0d53a6f5b4f5ccebe3f7b4d8cfd440e07affa509
---

 libavcodec/avcodec.h          |    5 +++++
 libavcodec/bitstream_filter.c |    5 +++--
 libavcodec/version.h          |    4 ++--
 3 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index ff70d25..22a68fb 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 a4e437d..fb690b6 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 a89ad91..c7fc1f1 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, \



More information about the ffmpeg-cvslog mailing list