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/7094>
This commit is contained in:
Piotr Brzeziński 2024-06-24 16:00:45 +02:00
parent e71ffe978a
commit 32d4e5f73c

View file

@ -1792,7 +1792,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