[SCM] libav/experimental: do not write dts if pts is not set

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 16:45:29 UTC 2013


The following commit has been merged in the experimental branch:
commit 8f14cdee73aefef246a2b1cd827ae3897e432793
Author: Baptiste Coudurier <baptiste.coudurier at gmail.com>
Date:   Sun May 10 01:37:58 2009 +0000

    do not write dts if pts is not set
    
    Originally committed as revision 18779 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
index 239b035..9c9dbbe 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;
             }

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list