[FFmpeg-soc] [soc]: r2382 - dvbmuxer/mpegtsenc.c

bcoudurier subversion at mplayerhq.hu
Wed Jun 4 08:22:06 CEST 2008


Author: bcoudurier
Date: Wed Jun  4 08:22:06 2008
New Revision: 2382

Log:
take into account header and pcr field when computing next pcr, better be safe

Modified:
   dvbmuxer/mpegtsenc.c

Modified: dvbmuxer/mpegtsenc.c
==============================================================================
--- dvbmuxer/mpegtsenc.c	(original)
+++ dvbmuxer/mpegtsenc.c	Wed Jun  4 08:22:06 2008
@@ -518,7 +518,7 @@ static void mpegts_write_pes(AVFormatCon
 
         write_pcr = !ts->cur_pcr;
         if (ts_st->pid == ts_st->service->pcr_pid) {
-            pcr = ts->cur_pcr + TS_PACKET_SIZE*8*90000LL / ts->mux_rate;
+            pcr = ts->cur_pcr + (TS_PACKET_SIZE+4+7)*8*90000LL / ts->mux_rate;
             if (pcr - ts->last_pcr > MAX_DELTA_PCR)
                 write_pcr = 1;
         }



More information about the FFmpeg-soc mailing list