]> git.sesse.net Git - vlc/commitdiff
Another ptime fix
authorRémi Denis-Courmont <rdenis@simphalempin.com>
Wed, 11 Jun 2008 18:45:27 +0000 (21:45 +0300)
committerRémi Denis-Courmont <rdenis@simphalempin.com>
Wed, 11 Jun 2008 18:45:27 +0000 (21:45 +0300)
modules/stream_out/rtp.c

index 8ce770f742563e7d2c7ca821eeec920fd8739770..6a25c86068b4f172254a7d428ce3b1d87dfff3c7 100644 (file)
@@ -826,7 +826,7 @@ rtp_set_ptime (sout_stream_id_t *id, unsigned ptime_ms, size_t bytes)
     if (spl < rtp_mtu (id)) /* MTU is big enough for ptime */
         id->i_mtu = 12 + spl;
     else /* MTU is too small for ptime, align to a sample boundary */
-        id->i_mtu = (id->i_mtu / bytes) * bytes;
+        id->i_mtu = 12 + (((id->i_mtu - 12) / bytes) * bytes);
 }
 
 /** Add an ES as a new RTP stream */