summaryrefslogtreecommitdiff
path: root/libavcodec/libx264.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/libx264.c')
-rw-r--r--libavcodec/libx264.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c
index 17926627f5..bb92110801 100644
--- a/libavcodec/libx264.c
+++ b/libavcodec/libx264.c
@@ -279,7 +279,8 @@ static av_cold int X264_init(AVCodecContext *avctx)
(float)avctx->rc_initial_buffer_occupancy / avctx->rc_buffer_size;
}
- x4->params.rc.f_ip_factor = 1 / fabs(avctx->i_quant_factor);
+ if (avctx->i_quant_factor > 0)
+ x4->params.rc.f_ip_factor = 1 / fabs(avctx->i_quant_factor);
x4->params.rc.f_pb_factor = avctx->b_quant_factor;
x4->params.analyse.i_chroma_qp_offset = avctx->chromaoffset;
@@ -559,6 +560,7 @@ static const AVCodecDefault x264_defaults[] = {
{ "b", "0" },
{ "bf", "-1" },
{ "g", "-1" },
+ { "i_qfactor", "-1" },
{ "qmin", "-1" },
{ "qmax", "-1" },
{ "qdiff", "-1" },