v4l2videodec: set frame duration according to framerate

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1989>
This commit is contained in:
Hou Qi 2022-03-14 16:19:33 +08:00 committed by Tim-Philipp Müller
parent 842c59a4b6
commit c1e639bf08

View file

@ -566,6 +566,7 @@ gst_v4l2_video_dec_loop (GstVideoDecoder * decoder)
if (oldest_frame)
gst_video_codec_frame_unref (oldest_frame);
frame->duration = self->v4l2capture->duration;
frame->output_buffer = buffer;
buffer = NULL;
ret = gst_video_decoder_finish_frame (decoder, frame);