diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c index e2830683e8dd867a1b28df82fc71c8f7a35a8894..7e78559e042ebbd3d903fc39ab8592f4d3fcbfda 100644 --- a/libavformat/mpegtsenc.c +++ b/libavformat/mpegtsenc.c @@ -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;