Browse Source

mpegts: do not set pts for missing dts in video streams

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.2-rc1
Rainer Hochecker Michael Niedermayer 11 years ago
parent
commit
f65afef1df
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      libavformat/mpegts.c

+ 4
- 1
libavformat/mpegts.c View File

@@ -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);


Loading…
Cancel
Save