diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c index fd30e7053fcffdfb3d931868baec372a16ad06a6..3517d74830a038cc343bb38683fa38e41de86968 100644 --- a/libavformat/mpegtsenc.c +++ b/libavformat/mpegtsenc.c @@ -659,6 +659,8 @@ static int mpegts_write_header(AVFormatContext *s) service->pcr_packet_period = pcr_st->codec->time_base.den/(10*pcr_st->codec->time_base.num); } + if(!service->pcr_packet_period) + service->pcr_packet_period = 1; } // output a PCR as soon as possible