# HG changeset patch # User michael # Date 1096808294 0 # Node ID b832a27355ec0aa812808bc5f6830aa1ce7e61f7 # Parent 7c5ec900b38a7760e06cd312efde002eb1196177 initial dts fix diff -r 7c5ec900b38a -r b832a27355ec mpeg.c --- 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 diff -r 7c5ec900b38a -r b832a27355ec utils.c --- 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;