changeset 4913:5d22e1946275 libavformat

do not write dts if pts is not set
author bcoudurier
date Sun, 10 May 2009 01:37:58 +0000
parents f718560a7763
children 75a9c3042800
files mpegtsenc.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mpegtsenc.c	Sun May 10 01:02:18 2009 +0000
+++ b/mpegtsenc.c	Sun May 10 01:37:58 2009 +0000
@@ -597,7 +597,7 @@
                 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 @@
                 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;
             }