mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 16:50:47 +00:00
va: h264enc: Do not let L0 number surplus the HW limitation.
The algorithm to calculate the L0/L1 number may let the L0 number surplus the HW limitation. We should ensure that limitation after that calculation. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2202>
This commit is contained in:
parent
2613930372
commit
277aa12b86
1 changed files with 3 additions and 0 deletions
|
@ -1123,6 +1123,9 @@ _generate_gop_structure (GstVaH264Enc * self)
|
|||
self->gop.ref_num_list0--;
|
||||
self->gop.ref_num_list1++;
|
||||
}
|
||||
|
||||
if (self->gop.ref_num_list0 > list0)
|
||||
self->gop.ref_num_list0 = list0;
|
||||
}
|
||||
|
||||
/* It's OK, keep slots for GST_VIDEO_CODEC_FRAME_IS_FORCE_KEYFRAME frame. */
|
||||
|
|
Loading…
Reference in a new issue