[FFmpeg-devel] [PATCH 1/7] lavc: move bitstream filter args to the bsf ctx
Rodger Combs
rodger.combs at gmail.com
Thu Oct 8 22:07:35 CEST 2015
---
libavcodec/avcodec.h | 1 +
libavcodec/bitstream_filter.c | 5 +++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index ff70d25..ce42e57 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -5026,6 +5026,7 @@ typedef struct AVBitStreamFilterContext {
struct AVBitStreamFilter *filter;
AVCodecParserContext *parser;
struct AVBitStreamFilterContext *next;
+ 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);
}
--
2.6.0
More information about the ffmpeg-devel
mailing list