1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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

Avoids uninitialized reads.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
This commit is contained in:
Baptiste Coudurier 2011-01-29 17:05:42 -08:00 committed by Anton Khirnov
parent 07a227b432
commit 5caa2de19e

View File

@ -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.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; return bufsize;
} }