diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-07-08 22:18:34 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-07-08 22:29:34 +0200 |
commit | d8ce478c43d9096bcf38b50c849e9ed45647542d (patch) | |
tree | 4deadbacccc4241c915f44a715de743d3bba71c7 /libavformat | |
parent | 299387ebf4d98d4808f065fd3797b0fa108f506f (diff) | |
download | ffmpeg-d8ce478c43d9096bcf38b50c849e9ed45647542d.tar.gz |
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>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/utils.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index 70f8d46aae..b1b48feffb 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -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; |