aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-03-02 12:41:10 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-03-23 20:31:05 +0100
commite8919d6522c83732f75cd16d8babcb0527b8cc25 (patch)
treee311b95bc33d6cbb163469fa118aa0e3f8f77139
parentb017785fa55cf42d61e84861eba7c73dd4d33e3b (diff)
downloadffmpeg-e8919d6522c83732f75cd16d8babcb0527b8cc25.tar.gz
Revert "mpegts: do not set pts for missing dts in video streams"
This reverts commit f65afef1df49f53e14c8d4173ff960fff8d44ecb. If only pts is coded then dts must be equal pts See Rec. ITU-T H.222.0 (06/2012) / ISO/IEC 13818-1:2013 (E) 2.7.5 Found-by: Baptiste Coudurier (cherry picked from commit 0bf882864ecd228d53555c57595eeca048662991) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/mpegts.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index a7819ca97a..242d353399 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -996,10 +996,7 @@ static int mpegts_push_data(MpegTSFilter *filter,
pes->pts = AV_NOPTS_VALUE;
pes->dts = AV_NOPTS_VALUE;
if ((flags & 0xc0) == 0x80) {
- 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;
+ pes->dts = pes->pts = ff_parse_pes_pts(r);
r += 5;
} else if ((flags & 0xc0) == 0xc0) {
pes->pts = ff_parse_pes_pts(r);