[dvblast-devel] Change the RTP timestamp counter in order to use only local time so receivers can correctly manage their input buffer

Sebastien RAILLARD git at videolan.org
Sun Apr 5 22:48:40 CEST 2015


dvblast | branch: master | Sebastien RAILLARD <sr at coexsi.fr> | Wed Mar 25 17:11:22 2015 +0100| [4b5c0ac93438f808e9073073a33d1891bfd632fa] | committer: Christophe Massiot

Change the RTP timestamp counter in order to use only local time so receivers can correctly manage their input buffer

> http://git.videolan.org/gitweb.cgi/dvblast.git/?a=commit;h=4b5c0ac93438f808e9073073a33d1891bfd632fa
---

 output.c |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/output.c b/output.c
index 790ffb8..d3dfff4 100644
--- a/output.c
+++ b/output.c
@@ -346,10 +346,16 @@ static void output_Flush( output_t *p_output )
         rtp_set_hdr( p_rtp_hdr );
         rtp_set_type( p_rtp_hdr, RTP_TYPE_TS );
         rtp_set_seqnum( p_rtp_hdr, p_output->i_seqnum++ );
+        /* Older RTP timestamp calculation */
+        /*
         rtp_set_timestamp( p_rtp_hdr,
                            p_output->i_ref_timestamp
                             + (p_packet->i_dts - p_output->i_ref_wallclock)
                                * 9 / 100 );
+        */
+        /* New timestamp based only on local time when sent */
+        /* 90 kHz clock = 90000 counts per second */
+        rtp_set_timestamp( p_rtp_hdr, i_wallclock * 9 / 100);
         rtp_set_ssrc( p_rtp_hdr, p_output->config.pi_ssrc );
 
         i_iov++;



More information about the dvblast-devel mailing list