diff options
author | Rainer Hochecker <fernetmenta@online.de> | 2013-12-03 10:03:04 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-12-04 02:18:04 +0100 |
commit | f65afef1df49f53e14c8d4173ff960fff8d44ecb (patch) | |
tree | 5a3a099b34e67eb9cd2eaae2b3d3deb6747028ef | |
parent | 394b0c830a21e6fa343053d3b8fa92b9b08fd380 (diff) | |
download | ffmpeg-f65afef1df49f53e14c8d4173ff960fff8d44ecb.tar.gz |
mpegts: do not set pts for missing dts in video streams
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/mpegts.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index 59b0058074..d67c63a4de 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -972,7 +972,10 @@ static int mpegts_push_data(MpegTSFilter *filter, pes->pts = AV_NOPTS_VALUE; pes->dts = AV_NOPTS_VALUE; if ((flags & 0xc0) == 0x80) { - pes->dts = pes->pts = ff_parse_pes_pts(r); + pes->pts = ff_parse_pes_pts(r); + /* video pts is not monotonic, can't be used for dts */ + if (pes->st->codec->codec_type != AVMEDIA_TYPE_VIDEO) + pes->dts = pes->pts; r += 5; } else if ((flags & 0xc0) == 0xc0) { pes->pts = ff_parse_pes_pts(r); |