diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-08-08 23:35:22 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-08-09 00:01:48 +0200 |
commit | 9a5f61ac62ab1a191f0ea81caef1e386a4c1e242 (patch) | |
tree | d853b7de1ed0aad3e4e237e0d72530733481727f | |
parent | 640a905ece0fecc83f05dfaca7e91a0ecc65d746 (diff) | |
parent | 5caa2de19ece830e32c95731bc92a423d55cff0c (diff) | |
download | ffmpeg-9a5f61ac62ab1a191f0ea81caef1e386a4c1e242.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
libx264: do not set pic quality if no frame is output
libx264: add preset, tune, profile and fastfirstpass private options
Conflicts:
libavcodec/libx264.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/libx264.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c index 670a7802e1..63968622be 100644 --- a/libavcodec/libx264.c +++ b/libavcodec/libx264.c @@ -305,8 +305,10 @@ static av_cold int X264_init(AVCodecContext *avctx) check_default_settings(avctx); if (x4->preset || x4->tune) { - if (x264_param_default_preset(&x4->params, x4->preset, x4->tune) < 0) - return -1; + 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); + } } x4->params.pf_log = X264_log; @@ -363,8 +365,10 @@ static av_cold int X264_init(AVCodecContext *avctx) x264_param_apply_fastfirstpass(&x4->params); if (x4->profile) - if (x264_param_apply_profile(&x4->params, x4->profile) < 0) - return -1; + if (x264_param_apply_profile(&x4->params, x4->profile) < 0) { + av_log(avctx, AV_LOG_ERROR, "Error setting profile %s.\n", x4->profile); + return AVERROR(EINVAL); + } x4->params.i_width = avctx->width; x4->params.i_height = avctx->height; @@ -435,7 +439,12 @@ static const AVOption options[] = { { NULL }, }; -static const AVClass class = { "libx264", av_default_item_name, options, LIBAVUTIL_VERSION_INT }; +static const AVClass class = { + .class_name = "libx264", + .item_name = av_default_item_name, + .option = options, + .version = LIBAVUTIL_VERSION_INT, +}; AVCodec ff_libx264_encoder = { .name = "libx264", |