From de308639da3c0f17cdeb75b2246e4a08b08d5bc0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Fri, 14 May 2010 14:26:34 +0200 Subject: [PATCH] [MOVED FROM BAD 010/134] vp8enc: Update the latency when initializing the encoder --- ext/vp8/gstvp8enc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ext/vp8/gstvp8enc.c b/ext/vp8/gstvp8enc.c index 62a688f..fb939b4 100644 --- a/ext/vp8/gstvp8enc.c +++ b/ext/vp8/gstvp8enc.c @@ -595,6 +595,10 @@ gst_vp8_enc_handle_frame (GstBaseVideoEncoder * base_video_encoder, status = vpx_codec_enc_init (&encoder->encoder, &vpx_codec_vp8_cx_algo, &cfg, 0); + gst_base_video_encoder_set_latency (base_video_encoder, 0, + gst_util_uint64_scale (encoder->max_latency, + base_video_encoder->state.fps_d * GST_SECOND, + base_video_encoder->state.fps_n)); if (status) { GST_ERROR ("encoder input error"); return GST_FLOW_ERROR; -- 2.7.4