aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrej Peterka <andrej.peterka@najdi.si>2011-09-07 08:27:28 +0200
committerAnton Khirnov <anton@khirnov.net>2011-09-07 09:16:06 +0200
commit2bb5d637fc9821247cd4cd49a048bd52966ebb34 (patch)
tree5b333333a50405015634210b2fe33ceec90feec4
parent9c684feadc063473da3f9e341fa07e6c17b75154 (diff)
downloadffmpeg-2bb5d637fc9821247cd4cd49a048bd52966ebb34.tar.gz
libx264: fix setting the H.264 level
Move setting it after x264_param_default_preset() Signed-off-by: Anton Khirnov <anton@khirnov.net>
-rw-r--r--libavcodec/libx264.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c
index d915735a76..305c26a781 100644
--- a/libavcodec/libx264.c
+++ b/libavcodec/libx264.c
@@ -229,15 +229,15 @@ static av_cold int X264_init(AVCodecContext *avctx)
x4->params.analyse.i_trellis = avctx->trellis;
x4->params.analyse.i_noise_reduction = avctx->noise_reduction;
- if (avctx->level > 0)
- x4->params.i_level_idc = avctx->level;
-
if (x4->preset || x4->tune)
if (x264_param_default_preset(&x4->params, x4->preset, x4->tune) < 0) {
av_log(avctx, AV_LOG_ERROR, "Error setting preset/tune %s/%s.\n", x4->preset, x4->tune);
return AVERROR(EINVAL);
}
+ if (avctx->level > 0)
+ x4->params.i_level_idc = avctx->level;
+
x4->params.pf_log = X264_log;
x4->params.p_log_private = avctx;
x4->params.i_log_level = X264_LOG_DEBUG;