The source project of this merge request has been removed.
v4l2videoenc: only set latency if the frame duration is valid
Below code in gstv4l2videoenc.c didn't check self->v4l2capture->duration. It will cause critical log "gst_video_encoder_set_latency: assertion 'GST_CLOCK_TIME_IS_VALID (min_latency)' failed" printed when self->v4l2capture->duration is invalid.
`latency = self->v4l2capture->min_buffers * self->v4l2capture->duration;
gst_video_encoder_set_latency (encoder, latency, latency);`