From cc9afe480c67e725e5b02a118bced8730f0235f7 Mon Sep 17 00:00:00 2001 From: Dennis Yurasov Date: Thu, 20 Mar 2025 16:33:16 +0300 Subject: [PATCH] MT#55283 Restore sequencer values from stats Closes #1918 Change-Id: If7f3f5aca2cbb94fe10baeaaaaf70f3dfc88ed3e (cherry picked from commit 969dfd9390b5a5c26766f23c36798e518e611daa) (cherry picked from commit 83afdb423f7e77e8d3c71d487c394aca6a030343) --- daemon/codec.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/daemon/codec.c b/daemon/codec.c index 21e2f776f..8388b8101 100644 --- a/daemon/codec.c +++ b/daemon/codec.c @@ -1895,6 +1895,14 @@ static int __handler_func_sequencer(struct media_packet *mp, struct transcode_pa seq = g_slice_alloc0(sizeof(*seq)); packet_sequencer_init(seq, (GDestroyNotify) __transcode_packet_free); g_hash_table_insert(ssrc_in_p->sequencers, mp->media_out, seq); + // this is a quick fix to restore sequencer values until upper layer behavior will be fixed + unsigned int stats_ext_seq = atomic_get_na(&ssrc_in->stats->ext_seq); + if(stats_ext_seq) { + seq->roc = stats_ext_seq>>16; + seq->ext_seq = stats_ext_seq-1; + seq->seq = stats_ext_seq & 0xffff; + ilog(LOG_DEBUG, "transcode: restoring sequencer, roc: %d ext_seq: %u seq: %u", seq->roc, seq->ext_seq, seq->seq); + } } uint16_t seq_ori = seq->seq;