Mercurial > libavformat.hg
changeset 367:3fca8e9142a4 libavformat
avsync patch by (Gildas Bazin <gbazin at altern dot org>)
author | michael |
---|---|
date | Fri, 20 Feb 2004 14:39:15 +0000 |
parents | cbcbaeff1f2c |
children | 08e042299038 |
files | mpegts.c utils.c |
diffstat | 2 files changed, 9 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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;
--- 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;