fixes #8857 If we do not clear the enc_ctrl, we will reuse previous frames' data like FrameType.
Unified · Split
| @@ -1271,6 +1271,8 @@ static void clear_unused_frames(QSVEncContext *q) · 1270 unmodified lines | ||
| 1271 | 1271 | while (cur) { |
| 1272 | 1272 | if (cur->used && !cur->surface.Data.Locked) { |
| 1273 | 1273 | free_encoder_ctrl_payloads(&cur->enc_ctrl); |
| 1274 | + //do not reuse enc_ctrl from previous frame | |
| 1275 | + memset(&cur->enc_ctrl, 0, sizeof(cur->enc_ctrl)); | |
| 1274 | 1276 | if (cur->frame->format == AV_PIX_FMT_QSV) { |
| 1275 | 1277 | av_frame_unref(cur->frame); |
| 1276 | 1278 | } |