[FFmpeg-devel] [PATCH] avformat/mpegts: skip subtitle PES packets if PCR not available

Marton Balint cus at passwd.hu
Sat Dec 15 16:57:36 EET 2018



On Sat, 15 Dec 2018, Jan Ekström wrote:

> Fixes issues when a subtitle packet is received before PCR for the
> program has been received, leading to wildly jumping timestamps
> on the lavf client side as well as in the re-ordering logic.
>
> This usually happens in case of multiplexes where the PCR of a
> program is not taken into account with subtitle tracks' DTS/PTS.
>
> In case someone actually wants to pass through all received packets,
> the behavior can be controlled with an AVOption.
> ---
> libavformat/mpegts.c | 22 ++++++++++++++++++++++
> 1 file changed, 22 insertions(+)

If PCR is unknown, then it is better to return the packets with 
AV_NOPTS_VALUE pts and dts instead of skipping them entirely. Or is there 
a case which is not fixed by this approach?

IMHO you might even do this unconditionally as long as "fix_teletext_pts" 
option is set (which is the default).

Regards,
Marton


More information about the ffmpeg-devel mailing list