summaryrefslogtreecommitdiff
path: root/libavcodec/libx264.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/libx264.c')
-rw-r--r--libavcodec/libx264.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c
index 17cae713ef..bcf8b1f688 100644
--- a/libavcodec/libx264.c
+++ b/libavcodec/libx264.c
@@ -144,7 +144,8 @@ static int X264_frame(AVCodecContext *ctx, uint8_t *buf,
}
x4->out_pic.key_frame = pic_out.b_keyframe;
- x4->out_pic.quality = (pic_out.i_qpplus1 - 1) * FF_QP2LAMBDA;
+ if (bufsize)
+ x4->out_pic.quality = (pic_out.i_qpplus1 - 1) * FF_QP2LAMBDA;
return bufsize;
}