[FFmpeg-soc] [soc]: r569 - dvbmuxer/muxer_dev/mpegtsenc.c

realsun subversion at mplayerhq.hu
Tue Jul 31 17:26:30 CEST 2007


Author: realsun
Date: Tue Jul 31 17:26:30 2007
New Revision: 569

Log:
modify pcr init value, and adjust pcr value after a new packet is tobe muxed

Modified:
   dvbmuxer/muxer_dev/mpegtsenc.c

Modified: dvbmuxer/muxer_dev/mpegtsenc.c
==============================================================================
--- dvbmuxer/muxer_dev/mpegtsenc.c	(original)
+++ dvbmuxer/muxer_dev/mpegtsenc.c	Tue Jul 31 17:26:30 2007
@@ -479,7 +479,7 @@ static int mpegts_write_header(AVFormatC
                    100 * 16;                                        /* PAT size */
         ts->mux_rate = bitrate;
     }
-    ts->last_pcr = 10000;  /* add a preload value */
+    ts->last_pcr = 0;
 
     service->pcr_packet_freq = (ts->mux_rate * PCR_RETRANS_TIME) /
         (TS_PACKET_SIZE * 8 * 1000);
@@ -755,6 +755,7 @@ static int output_packet(AVFormatContext
     if((result = ff_pes_find_beststream(ctx, s->packet_size, flush, &pcr, &best_i)) <= 0)
         return result;
 
+    s->last_pcr = pcr;
     assert(best_i >= 0);
 
     st = ctx->streams[best_i];



More information about the FFmpeg-soc mailing list