output a pcr as soon as possible, patch by Mike Scheutzow, scheutzow at alcatel-lucen...
authorMike Scheutzow <scheutzow@alcatel-lucent.com>
Wed, 13 Jan 2010 20:26:59 +0000 (20:26 +0000)
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>
Wed, 13 Jan 2010 20:26:59 +0000 (20:26 +0000)
Originally committed as revision 21197 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/mpegtsenc.c

index e283068..7e78559 100644 (file)
@@ -485,6 +485,9 @@ static int mpegts_write_header(AVFormatContext *s)
     else
         ts->mux_rate = total_bit_rate;
 
+    // output a PCR as soon as possible
+    service->pcr_packet_count = service->pcr_packet_period;
+
     // adjust pcr
     ts->cur_pcr /= ts->mux_rate;