mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-04 23:46:43 +00:00
av1enc: Handle force-keyunit events properly by requesting keyframes
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7264>
This commit is contained in:
parent
016a76ecb1
commit
b8fdd7f72a
1 changed files with 6 additions and 0 deletions
|
@ -1005,6 +1005,12 @@ gst_av1_enc_handle_frame (GstVideoEncoder * encoder, GstVideoCodecFrame * frame)
|
||||||
duration = 1;
|
duration = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (GST_VIDEO_CODEC_FRAME_IS_FORCE_KEYFRAME (frame)) {
|
||||||
|
GST_DEBUG_OBJECT (av1enc, "Forcing keyframe for frame %u",
|
||||||
|
frame->system_frame_number);
|
||||||
|
flags |= AOM_EFLAG_FORCE_KF;
|
||||||
|
}
|
||||||
|
|
||||||
if (aom_codec_encode (&av1enc->encoder, &raw, scaled_pts, duration, flags)
|
if (aom_codec_encode (&av1enc->encoder, &raw, scaled_pts, duration, flags)
|
||||||
!= AOM_CODEC_OK) {
|
!= AOM_CODEC_OK) {
|
||||||
gst_av1_codec_error (&av1enc->encoder, "Failed to encode frame");
|
gst_av1_codec_error (&av1enc->encoder, "Failed to encode frame");
|
||||||
|
|
Loading…
Reference in a new issue