Commit d8ce478c authored by Michael Niedermayer's avatar Michael Niedermayer

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: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 299387eb
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment