From fa5385bc8e36788e8180886c14cf727f52c66b8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 6 Jul 2021 11:47:42 +0300 Subject: [PATCH] ajasrc: Set output buffer duration based on the framerate as an estimate --- gstajasrc.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gstajasrc.cpp b/gstajasrc.cpp index 8021cc2a9c..7bbf797db0 100644 --- a/gstajasrc.cpp +++ b/gstajasrc.cpp @@ -1423,7 +1423,11 @@ restart: now_gst = 0; GST_BUFFER_PTS(video_buffer) = now_gst; + GST_BUFFER_DURATION(video_buffer) = gst_util_uint64_scale( + GST_SECOND, self->configured_info.fps_d, self->configured_info.fps_n); GST_BUFFER_PTS(audio_buffer) = now_gst; + GST_BUFFER_DURATION(audio_buffer) = gst_util_uint64_scale( + GST_SECOND, self->configured_info.fps_d, self->configured_info.fps_n); // TODO: Drift detection and compensation