Comment 2 for bug 764707

Revision history for this message
Klaus Warnke (k-warnke) wrote :

--- src/comp/c_generic.c 2010-08-22 14:00:49 +0000
+++ src/comp/c_generic.c 2011-05-11 15:43:40 +0000
@@ -5802,9 +5806,7 @@
                f_byte |= (rts & 0x01) << 4;

                /* Tsc bit */
- tsc = (rtp_context->ts_sc.state == SEND_SCALED &&
- !(packet_type == PACKET_UOR_2_ID &&
- is_deductible(rtp_context->ts_sc)));
+ tsc = (rtp_context->ts_sc.state == SEND_SCALED);
                f_byte |= (tsc & 0x01) << 3;

                /* rtp bit: set to 1 if RTP PT changed in this packet or changed

--- src/decomp/d_generic.c 2010-08-22 17:16:24 +0000
+++ src/decomp/d_generic.c 2011-05-11 11:33:21 +0000
@@ -5037,7 +5037,20 @@
                if(tsc)
                {
                        rohc_debugf(3, "TS is scaled\n");
- ts = d_decode_ts(&rtp_context->ts_sc, ts_received, ts_received_size);
+ if (ts_received_size > 0)
+ {
+ ts = d_decode_ts(&rtp_context->ts_sc, ts_received, ts_received_size);
+ }
+ else
+ {
+ struct ts_sc_decomp* ts_sc;
+ int sn_diff;
+
+ ts_sc = &rtp_context->ts_sc;
+ sn_diff = *sn - g_context->sn.v_ref_d;
+ ts_sc->ts_scaled += sn_diff;
+ ts = ts_sc->ts_stride * ts_sc->ts_scaled + ts_sc->ts_offset;
+ }
                }
                else
                {