aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2009-01-14 22:17:07 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2009-01-14 22:17:07 +0000
commit5541759f6fabccb5067da158fbb7458fb96b0155 (patch)
tree4f299927ff5fffc007110aa68feff8bb77217a83
parent46911c7ab803607fd9285927ed23426a9d297723 (diff)
downloadffmpeg-5541759f6fabccb5067da158fbb7458fb96b0155.tar.gz
only write dts if they differ from pts, according to specs
Originally committed as revision 16605 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavformat/mpegtsenc.c4
-rw-r--r--tests/libav.regression.ref4
2 files changed, 4 insertions, 4 deletions
diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
index 82b8d88fb3..77815d0949 100644
--- a/libavformat/mpegtsenc.c
+++ b/libavformat/mpegtsenc.c
@@ -576,7 +576,7 @@ static void mpegts_write_pes(AVFormatContext *s, AVStream *st,
header_len += 5;
flags |= 0x80;
}
- if (dts != AV_NOPTS_VALUE) {
+ if (dts != AV_NOPTS_VALUE && dts != pts) {
header_len += 5;
flags |= 0x40;
}
@@ -609,7 +609,7 @@ static void mpegts_write_pes(AVFormatContext *s, AVStream *st,
write_pts(q, flags >> 6, pts);
q += 5;
}
- if (dts != AV_NOPTS_VALUE) {
+ if (dts != AV_NOPTS_VALUE && dts != pts) {
write_pts(q, 1, dts);
q += 5;
}
diff --git a/tests/libav.regression.ref b/tests/libav.regression.ref
index d97a52cc1a..a7c4bcb9d7 100644
--- a/tests/libav.regression.ref
+++ b/tests/libav.regression.ref
@@ -9,8 +9,8 @@ c351132527ccb1e8cab06cc0822fde23 *./tests/data/b-libav.rm
bdb7484c68db722f66ba1630cf79844c *./tests/data/b-libav.mpg
378880 ./tests/data/b-libav.mpg
./tests/data/b-libav.mpg CRC=0x2b71a386
-9fd96456cbf2a550da816e563316d92f *./tests/data/b-libav.ts
-471692 ./tests/data/b-libav.ts
+676a06e0f0f6639f5199efd52fec9ca9 *./tests/data/b-libav.ts
+471316 ./tests/data/b-libav.ts
./tests/data/b-libav.ts CRC=0xcc4948e1
1b28a16652bb8ac528b33f7478ca18b6 *./tests/data/b-libav.swf
335771 ./tests/data/b-libav.swf