From 6a7cd32beb34c344e242294e685b83e28311c026 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Thu, 9 Jan 2025 14:28:58 -0400 Subject: [PATCH] MT#61822 fix missing duration scaling Change-Id: If0ebc38a30575346e2aaf08df7b125005cda0d80 --- daemon/media_player.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/daemon/media_player.c b/daemon/media_player.c index b3dc15606..1c7611551 100644 --- a/daemon/media_player.c +++ b/daemon/media_player.c @@ -756,12 +756,13 @@ static void packet_encoded_cache(AVPacket *pkt, struct codec_ssrc_handler *ch, s struct media_player_cache_packet *ep = g_slice_alloc0(sizeof(*ep)); + long duration = fraction_divl(pkt->duration, cr_fact); *ep = (__typeof__(*ep)) { .buf = buf, .s = *s, .pts = pkt->pts, - .duration_ts = pkt->duration, - .duration = (long long) pkt->duration * 1000000LL + .duration_ts = duration, + .duration = (long long) duration * 1000000LL / entry->coder.handler->dest_pt.clock_rate, };