mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 19:21:06 +00:00
vaav1enc: Do not change the PTS/DTS of output frames
The AV1 encoder does not reorder the frames, so there is no need to change the timestamp related meta data of output frames, just inheriting it from the input frames. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6751>
This commit is contained in:
parent
7ec4a7cc01
commit
8c4aa7067d
1 changed files with 1 additions and 17 deletions
|
@ -4012,23 +4012,6 @@ gst_va_av1_enc_prepare_output (GstVaBaseEnc * base,
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
if (frame_enc->flags & FRAME_FLAG_NOT_SHOW &&
|
||||
((frame_enc->type & FRAME_TYPE_REPEAT) == 0)) {
|
||||
frame->pts = self->last_pts;
|
||||
frame->dts = self->last_dts;
|
||||
frame->duration = GST_CLOCK_TIME_NONE;
|
||||
} else {
|
||||
frame->pts =
|
||||
base->start_pts + base->frame_duration * frame_enc->total_frame_count;
|
||||
/* The PTS should always be later than the DTS. */
|
||||
frame->dts = frame->pts - base->frame_duration;
|
||||
base->output_frame_count++;
|
||||
frame->duration = base->frame_duration;
|
||||
|
||||
self->last_pts = frame->pts;
|
||||
self->last_dts = frame->dts;
|
||||
}
|
||||
|
||||
if (frame_enc->flags & FRAME_FLAG_ALREADY_OUTPUTTED) {
|
||||
gsize sz;
|
||||
|
||||
|
@ -4071,6 +4054,7 @@ gst_va_av1_enc_prepare_output (GstVaBaseEnc * base,
|
|||
}
|
||||
|
||||
*complete = TRUE;
|
||||
base->output_frame_count++;
|
||||
|
||||
gst_buffer_replace (&frame->output_buffer, buf);
|
||||
gst_clear_buffer (&buf);
|
||||
|
|
Loading…
Reference in a new issue