diff options
author | Rainer Hochecker <fernetmenta@online.de> | 2013-12-03 10:03:04 +0100 |
---|---|---|
committer | Rainer Hochecker <fernetmenta@online.de> | 2013-12-04 10:01:56 +0100 |
commit | 55562c856bbcca1b8e1ac1813209de7154570443 (patch) | |
tree | 534c221c85d2330a16255cf59133192ccfa2d3a6 /lib/ffmpeg | |
parent | c43639929906b612c6fd3d1c47b937041e39a222 (diff) |
mpegts: do not set pts for missing dts in video streams
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'lib/ffmpeg')
-rw-r--r-- | lib/ffmpeg/libavformat/mpegts.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/ffmpeg/libavformat/mpegts.c b/lib/ffmpeg/libavformat/mpegts.c index b995f60fd4..4f2568667e 100644 --- a/lib/ffmpeg/libavformat/mpegts.c +++ b/lib/ffmpeg/libavformat/mpegts.c @@ -953,7 +953,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); |