vtenc: Fix redistribute latency spam

Just a quick fix to only report the maximum noticed delay (measured by frames inside the encoder) instead of changing
the reported latency every time the number there changes, which is way too often.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7098>
This commit is contained in:
Piotr Brzeziński 2024-06-24 16:00:45 +02:00 committed by Backport Bot
parent a593f2f71f
commit 67eae3cf31

View file

@ -1720,7 +1720,7 @@ gst_vtenc_update_latency (GstVTEnc * self)
}
CFNumberGetValue (value, kCFNumberSInt32Type, &frames);
if (self->latency_frames == -1 || self->latency_frames != frames) {
if (MAX (self->latency_frames, frames) != self->latency_frames) {
self->latency_frames = frames;
if (self->video_info.fps_d == 0 || self->video_info.fps_n == 0) {
/* FIXME: Assume 25fps. This is better than reporting no latency at