[FFmpeg-devel] [PATCH 2/4] avcodec: add format_option_for_user_func callback
Michael Niedermayer
michaelni at gmx.at
Mon May 11 03:18:17 CEST 2015
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
---
libavcodec/avcodec.h | 3 +++
libavcodec/options_table.h | 1 +
2 files changed, 4 insertions(+)
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 4aeb57a..4560d8c 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -37,6 +37,7 @@
#include "libavutil/dict.h"
#include "libavutil/frame.h"
#include "libavutil/log.h"
+#include "libavutil/opt.h"
#include "libavutil/pixfmt.h"
#include "libavutil/rational.h"
@@ -3146,6 +3147,8 @@ typedef struct AVCodecContext {
* - decoding: set by user through AVOPtions (NO direct access)
*/
char *codec_whitelist;
+
+ av_format_option_for_user_func format_option_for_user_func;
} AVCodecContext;
AVRational av_codec_get_pkt_timebase (const AVCodecContext *avctx);
diff --git a/libavcodec/options_table.h b/libavcodec/options_table.h
index a906864..f7d42a3 100644
--- a/libavcodec/options_table.h
+++ b/libavcodec/options_table.h
@@ -495,6 +495,7 @@ static const AVOption avcodec_options[] = {
{"codec_whitelist", "List of decoders that are allowed to be used", OFFSET(codec_whitelist), AV_OPT_TYPE_STRING, { .str = NULL }, CHAR_MIN, CHAR_MAX, A|V|S|D },
{"pixel_format", "set pixel format", OFFSET(pix_fmt), AV_OPT_TYPE_PIXEL_FMT, {.i64=AV_PIX_FMT_NONE}, -1, INT_MAX, 0 },
{"video_size", "set video size", OFFSET(width), AV_OPT_TYPE_IMAGE_SIZE, {.str=NULL}, 0, INT_MAX, 0 },
+{"format_option_for_user_func", NULL, OFFSET(format_option_for_user_func), AV_OPT_TYPE_PTR, {.str=NULL}, 0, 0, 0 },
{NULL},
};
--
1.7.9.5
More information about the ffmpeg-devel
mailing list