1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-08-25 02:41:50 +02:00

do not write dts if pts is not set

Originally committed as revision 18779 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Baptiste Coudurier 2009-05-10 01:37:58 +00:00
parent 31df40a130
commit 8f14cdee73

View File

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