[PATCH 2/5] Add log_level_offset to AVCodecContext.

Stefano Sabatini stefano.sabatini-lala
Sun May 16 02:00:00 CEST 2010


---
 libavcodec/avcodec.h |    2 ++
 libavcodec/options.c |    3 ++-
 2 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 4a6712c..4b45334 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -2656,6 +2656,8 @@ typedef struct AVCodecContext {
      * - decoding: unused
      */
     float crf_max;
+
+    int log_level_offset;
 } AVCodecContext;
 
 /**
diff --git a/libavcodec/options.c b/libavcodec/options.c
index 3b50d2c..2655bb0 100644
--- a/libavcodec/options.c
+++ b/libavcodec/options.c
@@ -413,6 +413,7 @@ static const AVOption options[]={
 {"ssim", "ssim will be calculated during encoding", 0, FF_OPT_TYPE_CONST, CODEC_FLAG2_SSIM, INT_MIN, INT_MAX, V|E, "flags2"},
 {"intra_refresh", "use periodic insertion of intra blocks instead of keyframes", 0, FF_OPT_TYPE_CONST, CODEC_FLAG2_INTRA_REFRESH, INT_MIN, INT_MAX, V|E, "flags2"},
 {"crf_max", "in crf mode, prevents vbv from lowering quality beyond this point", OFFSET(crf_max), FF_OPT_TYPE_FLOAT, DEFAULT, 0, 51, V|E},
+{"log_level_offset", "set the log level offset", OFFSET(log_level_offset), FF_OPT_TYPE_INT, 0, INT_MIN, INT_MAX },
 {NULL},
 };
 
@@ -423,7 +424,7 @@ static const AVOption options[]={
 #undef D
 #undef DEFAULT
 
-static const AVClass av_codec_context_class = { "AVCodecContext", context_to_name, options, LIBAVUTIL_VERSION_INT };
+static const AVClass av_codec_context_class = { "AVCodecContext", context_to_name, options, LIBAVUTIL_VERSION_INT, OFFSET(log_level_offset) };
 
 void avcodec_get_context_defaults2(AVCodecContext *s, enum AVMediaType codec_type){
     int flags=0;
-- 
1.7.0


--/9DWx/yDrRhgMJTb
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment; filename="0003-Change-ff_parse_expr-and-ff_parse_and_eval_expr-inte.patch"




More information about the ffmpeg-devel mailing list