va: h264dec: set latency

parent 1d1b3eb8
Pipeline #187949 waiting for manual action with stages
in 42 seconds
......@@ -1039,6 +1039,21 @@ gst_va_h264_dec_negotiate (GstVideoDecoder * decoder)
GST_INFO_OBJECT (self, "Negotiated caps %" GST_PTR_FORMAT,
self->output_state->caps);
{
GstClockTime min, max;
gint fps_d, fps_n;
fps_d = self->output_state->info.fps_d;
fps_n = self->output_state->info.fps_n;
min = gst_util_uint64_scale_int (GST_SECOND, fps_d, fps_n);
max = self->dpb_size * min;
GST_LOG_OBJECT (self,
"latency min %" G_GUINT64_FORMAT " max %" G_GUINT64_FORMAT, min, max);
gst_video_decoder_set_latency (decoder, min, max);
}
return GST_VIDEO_DECODER_CLASS (parent_class)->negotiate (decoder);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment