changeset 5533:5a51cbec408b libavformat

fix ts packet header size computation, patch by Niobos, niobos at dest-unreach dot be
author bcoudurier
date Wed, 13 Jan 2010 20:20:05 +0000
parents 7c8ef3adb42e
children 2836866dd7a1
files mpegtsenc.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mpegtsenc.c	Wed Jan 13 20:14:53 2010 +0000
+++ b/mpegtsenc.c	Wed Jan 13 20:20:05 2010 +0000
@@ -472,7 +472,7 @@
     pat_pmt_size = url_ftell(s->pb) - pos;
 
     total_bit_rate +=
-        total_bit_rate *  4 / TS_PACKET_SIZE           + /* TS  header size */
+        total_bit_rate * 4 / (TS_PACKET_SIZE-4)        + /* TS header size */
         1000 * 8 * sdt_size     / PAT_RETRANS_TIME     + /* SDT size */
         1000 * 8 * pat_pmt_size / SDT_RETRANS_TIME     + /* PAT+PMT size */
         1000 * 8 * 8            / PCR_RETRANS_TIME;      /* PCR size */