1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-29 22:00:58 +02:00
FFmpeg/libavformat
Marton Balint 88ac76be79 avformat/mpegtsenc: fix PCR generation intervals
PCR generation was based on counting packets for both CBR and VBR streams.
Couting packets might have worked for CBR streams (when muxrate was specified)
but it only took into account the packets of a service (or the packets of the
PCR stream lately), so even that was problematic for multi program streams.

The new code works on actual timestamps for both CBR and VBR streams. For VBR
streams the behaviour of the old code is simulated by selecting a PCR interval
which is the highest multiple of the frame duration but still less than 100 ms.

It should be trivial to add support for setting the PCR interval for VBR
streams as well in a later patch.

The accuracy of PCR packets for CBR streams was greatly improved by preemtively
sending them at PCR intervals even if sending the payload of another stream
is in progress.

This may fix these tickets:
- #5750
- #7524

Signed-off-by: Marton Balint <cus@passwd.hu>
2019-08-14 23:24:11 +02:00
..
2019-05-20 11:58:12 -07:00
2019-05-20 11:58:12 -07:00
2019-08-13 15:38:57 +02:00
2019-03-20 18:38:48 +01:00
2019-05-20 11:58:12 -07:00
2019-05-20 11:58:12 -07:00
2019-06-10 21:35:20 +02:00
2018-09-11 21:48:49 +01:00
2019-03-20 18:38:48 +01:00
2019-06-14 21:36:39 +02:00
2019-06-29 19:22:19 +02:00
2019-07-14 22:17:43 +02:00