diff mbox series

[FFmpeg-devel] lavc/qsvenc: fix poor video quality with "-force_key_frames"

Message ID CAAE7vKcifWkdJdaZpH5U7EqOnxvTt_=xMCWHCDU+5bBLkTYdEw@mail.gmail.com
State New
Headers show
Series [FFmpeg-devel] lavc/qsvenc: fix poor video quality with "-force_key_frames"
Related show


Context Check Description
andriy/PPC64_make warning Make failed
andriy/PPC64_make warning Make failed
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished

Commit Message

Alex Pokotilo Oct. 14, 2020, 2:58 a.m. UTC
Subject: [PATCH] lavc/qsvenc: fix poor video quality with "-force_key_frames"

if run ffmpeg with "-force_key_frames" flag without this fix,
all new frames will have "MFX_FRAMETYPE_I | MFX_FRAMETYPE_REF"
after some time and video quality will become very poor.
Need to reset FrameType in free_encoder_ctrl_payloads.
 libavcodec/qsvenc.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series


diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c
index 1ed8f5d973..9e3c201416 100644
--- a/libavcodec/qsvenc.c
+++ b/libavcodec/qsvenc.c
@@ -1240,6 +1240,7 @@  static void free_encoder_ctrl_payloads(mfxEncodeCtrl* enc_ctrl)
         enc_ctrl->NumPayload = 0;
+        enc_ctrl->FrameType  = 0;