lavf: limit "Adjusting PTS forward" code to video streams
It can end up slightly messing up a series of valid timestamps after a invalid one. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
299387ebf4
commit
d8ce478c43
@ -1096,6 +1096,7 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st,
|
||||
int64_t old_diff= FFABS(st->cur_dts - duration - pkt->pts);
|
||||
int64_t new_diff= FFABS(st->cur_dts - pkt->pts);
|
||||
if( old_diff < new_diff && old_diff < (duration>>3)
|
||||
&& st->codec->codec_type == AVMEDIA_TYPE_VIDEO
|
||||
&& (!strcmp(s->iformat->name, "mpeg") ||
|
||||
!strcmp(s->iformat->name, "mpegts"))){
|
||||
pkt->pts += duration;
|
||||
|
Loading…
Reference in New Issue
Block a user