# HG changeset patch # User michael # Date 1077287955 0 # Node ID 3fca8e9142a49ed237c1eb42c13c6ba038830c88 # Parent cbcbaeff1f2c25fbb95369f56e6b069b1750a5b9 avsync patch by (Gildas Bazin ) diff -r cbcbaeff1f2c -r 3fca8e9142a4 mpegts.c --- a/mpegts.c Thu Feb 19 22:34:13 2004 +0000 +++ b/mpegts.c Fri Feb 20 14:39:15 2004 +0000 @@ -836,6 +836,7 @@ memcpy(pkt->data, p, len); pkt->stream_index = pes->st->index; pkt->pts = pes->pts; + pkt->dts = pes->dts; /* reset pts values */ pes->pts = AV_NOPTS_VALUE; pes->dts = AV_NOPTS_VALUE; diff -r cbcbaeff1f2c -r 3fca8e9142a4 utils.c --- a/utils.c Thu Feb 19 22:34:13 2004 +0000 +++ b/utils.c Fri Feb 20 14:39:15 2004 +0000 @@ -625,8 +625,14 @@ } else { /* presentation is not delayed : PTS and DTS are the same */ if (pkt->pts == AV_NOPTS_VALUE) { - pkt->pts = st->cur_dts; - pkt->dts = st->cur_dts; + if (pkt->dts == AV_NOPTS_VALUE) { + pkt->pts = st->cur_dts; + pkt->dts = st->cur_dts; + } + else { + st->cur_dts = pkt->dts; + pkt->pts = pkt->dts; + } } else { st->cur_dts = pkt->pts; pkt->dts = pkt->pts;