changeset 547:b832a27355ec libavformat

initial dts fix
author michael
date Sun, 03 Oct 2004 12:58:14 +0000
parents 7c5ec900b38a
children fbc9b13c35cd
files mpeg.c utils.c
diffstat 2 files changed, 2 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/mpeg.c	Sun Oct 03 12:17:46 2004 +0000
+++ b/mpeg.c	Sun Oct 03 12:58:14 2004 +0000
@@ -1016,19 +1016,6 @@
     pts= pkt->pts;
     dts= pkt->dts;
 
-    if(s->is_svcd) {
-        /* offset pts and dts slightly into the future to be able
-           to do the compatibility fix below.*/
-        pts += 2;
-        dts += 2;
-
-        if (stream->packet_number == 0 && dts == pts)
-            /* For the very first packet we want to force the DTS to be included.
-               This increases compatibility with lots of DVD players.
-               Since the MPEG-2 standard mandates that DTS is only written when
-               it is different from PTS we have to move it slightly into the past.*/
-            dts -= 2;
-    }
     if(s->is_vcd) {
         /* We have to offset the PTS, so that it is consistent with the SCR.
            SCR starts at 36000, but the first two packs contain only padding
--- a/utils.c	Sun Oct 03 12:17:46 2004 +0000
+++ b/utils.c	Sun Oct 03 12:58:14 2004 +0000
@@ -1979,8 +1979,8 @@
 static void truncate_ts(AVStream *st, AVPacket *pkt){
     int64_t pts_mask = (2LL << (st->pts_wrap_bits-1)) - 1;
     
-    if(pkt->dts < 0)
-        pkt->dts= 0;  //this happens for low_delay=0 and b frames, FIXME, needs further invstigation about what we should do here
+//    if(pkt->dts < 0)
+//        pkt->dts= 0;  //this happens for low_delay=0 and b frames, FIXME, needs further invstigation about what we should do here
     
     pkt->pts &= pts_mask;
     pkt->dts &= pts_mask;