[FFmpeg-cvslog] Fix libx264 fastfirstpass, move apply_fastfirstpass after user customized options.
Baptiste Coudurier
git at videolan.org
Wed Apr 20 00:25:19 CEST 2011
ffmpeg | branch: master | Baptiste Coudurier <baptiste.coudurier at gmail.com> | Tue Apr 19 15:23:36 2011 -0700| [37c0a443f9aa01fcf33215b3cde06961f1e9df5c] | committer: Baptiste Coudurier
Fix libx264 fastfirstpass, move apply_fastfirstpass after user customized options.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=37c0a443f9aa01fcf33215b3cde06961f1e9df5c
---
libavcodec/libx264.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c
index 5b20d35..0ef42cd 100644
--- a/libavcodec/libx264.c
+++ b/libavcodec/libx264.c
@@ -262,13 +262,6 @@ static av_cold int X264_init(AVCodecContext *avctx)
return -1;
}
- if (x4->fastfirstpass)
- x264_param_apply_fastfirstpass(&x4->params);
-
- if (x4->profile)
- if (x264_param_apply_profile(&x4->params, x4->profile) < 0)
- return -1;
-
x4->params.pf_log = X264_log;
x4->params.p_log_private = avctx;
x4->params.i_log_level = X264_LOG_DEBUG;
@@ -302,6 +295,13 @@ static av_cold int X264_init(AVCodecContext *avctx)
(float)avctx->rc_initial_buffer_occupancy / avctx->rc_buffer_size;
}
+ if (x4->fastfirstpass)
+ x264_param_apply_fastfirstpass(&x4->params);
+
+ if (x4->profile)
+ if (x264_param_apply_profile(&x4->params, x4->profile) < 0)
+ return -1;
+
x4->params.i_width = avctx->width;
x4->params.i_height = avctx->height;
x4->params.vui.i_sar_width = avctx->sample_aspect_ratio.num;
More information about the ffmpeg-cvslog
mailing list