Originally committed as revision 8426 to svn://svn.ffmpeg.org/ffmpeg/trunk
pull/126/head
Michael Niedermayer 18 years ago
parent e25f97313f
commit 41c8a56a14
  1. 20
      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 */ /* presentation is not delayed : PTS and DTS are the same */
if (pkt->pts == AV_NOPTS_VALUE) { if(pkt->pts == AV_NOPTS_VALUE)
if (pkt->dts == AV_NOPTS_VALUE) { pkt->pts = pkt->dts;
pkt->pts = st->cur_dts; if(pkt->pts == AV_NOPTS_VALUE)
pkt->dts = st->cur_dts; pkt->pts = st->cur_dts;
} pkt->dts = pkt->pts;
else { st->cur_dts = pkt->pts + pkt->duration;
st->cur_dts = pkt->dts;
pkt->pts = pkt->dts;
}
} else {
st->cur_dts = pkt->pts;
pkt->dts = pkt->pts;
}
st->cur_dts += 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); // 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);

Loading…
Cancel
Save