diff options
author | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2009-01-15 01:17:07 +0300 |
---|---|---|
committer | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2009-01-15 01:17:07 +0300 |
commit | 5541759f6fabccb5067da158fbb7458fb96b0155 (patch) | |
tree | 4f299927ff5fffc007110aa68feff8bb77217a83 /libavformat/mpegtsenc.c | |
parent | 46911c7ab803607fd9285927ed23426a9d297723 (diff) |
only write dts if they differ from pts, according to specs
Originally committed as revision 16605 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/mpegtsenc.c')
-rw-r--r-- | libavformat/mpegtsenc.c | 4 |
1 files changed, 2 insertions, 2 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; } |