Mercurial > libavformat.hg
changeset 1762:cb8b538021cd libavformat
muxing packets with unknown timestamps is not allowed
author | michael |
---|---|
date | Wed, 07 Feb 2007 22:26:48 +0000 |
parents | e9bff647e326 |
children | e77907af9057 |
files | asf-enc.c |
diffstat | 1 files changed, 2 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/asf-enc.c Wed Feb 07 17:56:31 2007 +0000 +++ b/asf-enc.c Wed Feb 07 22:26:48 2007 +0000 @@ -725,16 +725,8 @@ //XXX /FIXME use duration from AVPacket (quick hack by) pts = (pkt->pts != AV_NOPTS_VALUE) ? pkt->pts : pkt->dts; - if (pts == AV_NOPTS_VALUE) { - if (codec->codec_type == CODEC_TYPE_AUDIO) { - duration = (codec->frame_number * (int64_t)codec->frame_size * INT64_C(10000000)) / - codec->sample_rate; - } else { - duration = av_rescale(codec->frame_number * (int64_t)codec->time_base.num, 10000000, codec->time_base.den); - } - } else { - duration = pts * 10000; - } + assert(pts != AV_NOPTS_VALUE); + duration = pts * 10000; asf->duration= FFMAX(asf->duration, duration); packet_st = asf->nb_packets;