aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2009-05-10 01:37:58 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2009-05-10 01:37:58 +0000
commit8f14cdee73aefef246a2b1cd827ae3897e432793 (patch)
tree4675cb0427b6ca0a1439326f5cdc15fe208a8cc5 /libavformat
parent31df40a1305c7e3d4fc70513285691919e5c817b (diff)
downloadffmpeg-8f14cdee73aefef246a2b1cd827ae3897e432793.tar.gz
do not write dts if pts is not set
Originally committed as revision 18779 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/mpegtsenc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
index 239b035385..9c9dbbefa3 100644
--- a/libavformat/mpegtsenc.c
+++ b/libavformat/mpegtsenc.c
@@ -597,7 +597,7 @@ static void mpegts_write_pes(AVFormatContext *s, AVStream *st,
header_len += 5;
flags |= 0x80;
}
- if (dts != AV_NOPTS_VALUE && dts != pts) {
+ if (dts != AV_NOPTS_VALUE && pts != AV_NOPTS_VALUE && dts != pts) {
header_len += 5;
flags |= 0x40;
}
@@ -630,7 +630,7 @@ static void mpegts_write_pes(AVFormatContext *s, AVStream *st,
write_pts(q, flags >> 6, pts);
q += 5;
}
- if (dts != AV_NOPTS_VALUE && dts != pts) {
+ if (dts != AV_NOPTS_VALUE && pts != AV_NOPTS_VALUE && dts != pts) {
write_pts(q, 1, dts);
q += 5;
}