diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c index f071b501d7..8a2d27e793 100644 --- a/libavformat/mpeg.c +++ b/libavformat/mpeg.c @@ -1016,19 +1016,6 @@ static int mpeg_mux_write_packet(AVFormatContext *ctx, AVPacket *pkt) 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 --git a/libavformat/utils.c b/libavformat/utils.c index f8223a0d0a..7129b39b76 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -1979,8 +1979,8 @@ static void compute_pkt_fields2(AVStream *st, AVPacket *pkt){ 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; diff --git a/tests/libav.regression.ref b/tests/libav.regression.ref index dc887d91d6..5d777f0373 100644 --- a/tests/libav.regression.ref +++ b/tests/libav.regression.ref @@ -7,7 +7,7 @@ ffmpeg regression test ./data/b-libav.asf CRC=750f18c7 1cbf838e659d7fc3d3e33f4187b91f6c *./data/b-libav.rm 360251 ./data/b-libav.rm -65af12e9d9e8eb76af5efdadf769d7d7 *./data/b-libav.mpg +7aeebe6bf43c0c1219e41ce082a47051 *./data/b-libav.mpg 387072 ./data/b-libav.mpg ./data/b-libav.mpg CRC=16c74225 57a8dfc7926802bb337a9d8918de94a8 *./data/b-libav.swf