diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2007-03-17 01:21:40 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2007-03-17 01:21:40 +0000 |
commit | 41c8a56a1426d8c345ad270fadc37f1217ab8010 (patch) | |
tree | 72e55af7b5d71562dba900760186824a96a71df4 /libavformat | |
parent | e25f97313f362dd769bc6200f3a9665f1ff17d49 (diff) |
simplify
Originally committed as revision 8426 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/utils.c | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index d13700edb8..057493a2b2 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -648,20 +648,12 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st, } /* presentation is not delayed : PTS and DTS are the same */ - if (pkt->pts == AV_NOPTS_VALUE) { - 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; - } - st->cur_dts += pkt->duration; + if(pkt->pts == AV_NOPTS_VALUE) + pkt->pts = pkt->dts; + if(pkt->pts == AV_NOPTS_VALUE) + pkt->pts = st->cur_dts; + pkt->dts = pkt->pts; + st->cur_dts = pkt->pts + pkt->duration; } // av_log(NULL, AV_LOG_DEBUG, "OUTdelayed:%d pts:%"PRId64", dts:%"PRId64" cur_dts:%"PRId64"\n", presentation_delayed, pkt->pts, pkt->dts, st->cur_dts); |