mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-12 02:04:58 +00:00
libx264: do not set pic quality if no frame is output
Avoids uninitialized reads.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit 5caa2de19e
)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
This commit is contained in:
parent
96a453eb85
commit
67163d751b
@ -138,7 +138,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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user