]> git.sesse.net Git - ffmpeg/commitdiff
avformat/mpegts: only reset timestamps to NOPTS for DVB teletext
authorJan Ekström <jeebjp@gmail.com>
Wed, 12 Aug 2020 21:27:09 +0000 (00:27 +0300)
committerJan Ekström <jeebjp@gmail.com>
Tue, 18 Aug 2020 19:29:22 +0000 (22:29 +0300)
While having the possibility of non-NOPTS values that can suddenly
jump in time due to adjustments to match PCR is not nice for DVB
subtitles, apparently the parser for this format bases its behavior on
whether the packets' timestamps are NOPTS or not. Thus while we can
adjust timestamps, we should exclude DVB subtitles from the timestamp
unsetting logic.

Fixes #8844

libavformat/mpegts.c

index f71f18a57d91ca9b3c15fd3439873a6060aef0aa..50d4d5e9bc6b8853a5eb220cfac3d1caf89d15de 100644 (file)
@@ -1343,7 +1343,8 @@ skip:
                         }
                     }
 
-                    if (!pcr_found) {
+                    if (pes->st->codecpar->codec_id == AV_CODEC_ID_DVB_TELETEXT &&
+                        !pcr_found) {
                         av_log(pes->stream, AV_LOG_VERBOSE,
                                "Forcing DTS/PTS to be unset for a "
                                "non-trustworthy PES packet for PID %d as "