mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 08:46:40 +00:00
va: encoder: Do not reset the frame count when reconfig().
We should not reset the input/output_frame_count when some configure changes. For example, the if resolution changes, the current way just resets the frame count and make the PTS of the output buffer restart from the original PTS of the first frame. That causes a lot of QOS event and drop all the new frames. We should only reset them when encoder start(). Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2489>
This commit is contained in:
parent
994f2c56e2
commit
d47416d3a2
1 changed files with 3 additions and 2 deletions
|
@ -62,8 +62,6 @@ static void
|
|||
gst_va_base_enc_reset_state (GstVaBaseEnc * base)
|
||||
{
|
||||
base->frame_duration = GST_CLOCK_TIME_NONE;
|
||||
base->input_frame_count = 0;
|
||||
base->output_frame_count = 0;
|
||||
|
||||
base->width = 0;
|
||||
base->height = 0;
|
||||
|
@ -122,6 +120,9 @@ gst_va_base_enc_start (GstVideoEncoder * venc)
|
|||
|
||||
klass->reset_state (base);
|
||||
|
||||
base->input_frame_count = 0;
|
||||
base->output_frame_count = 0;
|
||||
|
||||
base->input_state = NULL;
|
||||
|
||||
/* Set the minimum pts to some huge value (1000 hours). This keeps
|
||||
|
|
Loading…
Reference in a new issue