avformat/mpegtsenc: get rid of packet counting for sdt/pat/pmt
authorMarton Balint <cus@passwd.hu>
Thu, 8 Aug 2019 07:53:10 +0000 (09:53 +0200)
committerMarton Balint <cus@passwd.hu>
Fri, 23 Aug 2019 20:49:01 +0000 (22:49 +0200)
commit2fb550893f7564118ca59765ee5fd1acab819581
treedf1f308a1a746106a1951bf4edfecf41fd752222
parent5c119bf189c3a8806991e6909f9dfc2686189e5e
avformat/mpegtsenc: get rid of packet counting for sdt/pat/pmt

The packet counting based approach caused excessive sdt/pat/pmt for VBR, so
let's use a timestamp based approach instead similar to how we emit PCRs.
SDT/PAT/PMT period should be consistent for both VBR and CBR from now on.

Also change the type of sdt_period and pat_period to AV_OPT_TYPE_DURATION so no
floating point math is necessary.

Fixes ticket #3714.

Signed-off-by: Marton Balint <cus@passwd.hu>
doc/muxers.texi
libavformat/mpegtsenc.c
libavformat/version.h
tests/ref/acodec/s302m
tests/ref/fate/concat-demuxer-simple2-lavf-ts
tests/ref/lavf/ts
tests/ref/seek/lavf-ts