From 5dd1a289061974ce635ae4d74147e6d19ac5d575 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Fri, 6 Feb 2015 19:04:32 +0100 Subject: [PATCH] x264enc: Don't set max latency to the same value as the encoder latency The meaning of the max latency is *not* the maximum latency this element will introduce. It is the maximum latency this element can endure without overflowing any buffers, which is infinite for x264enc. Fixes latency configuration in zero latency mode, where max latency was becoming 0... which usually won't work well if something else introduces latency as then max < min in the end, and latency configuration just fails. --- ext/x264/gstx264enc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/x264/gstx264enc.c b/ext/x264/gstx264enc.c index 0cc05283cd..0a2280bbe1 100644 --- a/ext/x264/gstx264enc.c +++ b/ext/x264/gstx264enc.c @@ -1741,7 +1741,7 @@ gst_x264_enc_set_latency (GstX264Enc * encoder) GST_TIME_ARGS (latency), max_delayed_frames); gst_video_encoder_set_latency (GST_VIDEO_ENCODER (encoder), latency, - latency); + GST_CLOCK_TIME_NONE); } else { /* We can't do live as we don't know our latency */ gst_video_encoder_set_latency (GST_VIDEO_ENCODER (encoder), -- 2.34.1