Mercurial > libavformat.hg
diff asf-enc.c @ 3236:57baf1166899 libavformat
Correct ASF duration.
Patch by Henrik Gulbrandsen: henrik gulbra net
author | benoit |
---|---|
date | Mon, 21 Apr 2008 08:19:16 +0000 |
parents | 4591452ec78c |
children | 7a0230981402 |
line wrap: on
line diff
--- a/asf-enc.c Sun Apr 20 20:28:12 2008 +0000 +++ b/asf-enc.c Mon Apr 21 08:19:16 2008 +0000 @@ -733,11 +733,10 @@ if(codec->codec_type == CODEC_TYPE_AUDIO) flags &= ~PKT_FLAG_KEY; - //XXX /FIXME use duration from AVPacket (quick hack by) pts = (pkt->pts != AV_NOPTS_VALUE) ? pkt->pts : pkt->dts; assert(pts != AV_NOPTS_VALUE); duration = pts * 10000; - asf->duration= FFMAX(asf->duration, duration); + asf->duration= FFMAX(asf->duration, duration + pkt->duration * 10000); packet_st = asf->nb_packets; put_frame(s, stream, s->streams[pkt->stream_index], pkt->dts, pkt->data, pkt->size, flags);