Skip to content

v4l2videoenc: only set latency if the frame duration is valid

Qi Hou requested to merge (removed):critical-log into master

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);`

Merge request reports

Loading