Commit 5caa2de1 authored by Baptiste Coudurier's avatar Baptiste Coudurier Committed by Anton Khirnov

libx264: do not set pic quality if no frame is output

Avoids uninitialized reads.
Signed-off-by: 's avatarAnton Khirnov <anton@khirnov.net>
parent 07a227b4
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment