From cce853db01c2c53fe6d003827481cdf4d434f21e Mon Sep 17 00:00:00 2001 From: Christian Spielberger Date: Mon, 3 Jun 2024 17:08:00 +0200 Subject: [PATCH] gst: set ausrc_prm duration --- modules/gst/gst.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/gst/gst.c b/modules/gst/gst.c index f0d549c102..6ca1eeae3e 100644 --- a/modules/gst/gst.c +++ b/modules/gst/gst.c @@ -486,6 +486,13 @@ static int gst_alloc(struct ausrc_st **stp, const struct ausrc *as, else *stp = st; + gst_element_get_state(st->pipeline, NULL, NULL, 500*1000*1000); + gint64 duration = 0; + gst_element_query_duration(st->pipeline, + GST_FORMAT_TIME, + &duration); + + prm->duration = duration / 1000000; return err; }