Skip to content

Commit

Permalink
avformat/mpegts: only reset timestamps to NOPTS for DVB teletext
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jeeb committed Aug 18, 2020
1 parent e8a88a1 commit c820c2d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libavformat/mpegts.c
Original file line number Diff line number Diff line change
Expand Up @@ -1343,7 +1343,8 @@ static int mpegts_push_data(MpegTSFilter *filter,
}
}

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 "
Expand Down

0 comments on commit c820c2d

Please sign in to comment.