lavc: move bitstream filter args to the bsf ctx

pull/154/head
Rodger Combs 9 years ago
parent 5740dc27e1
commit 0d53a6f5b4
  1. 5
      libavcodec/avcodec.h
  2. 5
      libavcodec/bitstream_filter.c
  3. 4
      libavcodec/version.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;

@ -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);
}

@ -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, \

Loading…
Cancel
Save