diff options
author | Henrik Gulbrandsen <henrik@gulbra.net> | 2008-04-21 12:19:16 +0400 |
---|---|---|
committer | Benoit Fouet <benoit.fouet@free.fr> | 2008-04-21 12:19:16 +0400 |
commit | 4fa6eac5f1c911a28f7b89dcdab0b4217ec8ecff (patch) | |
tree | 2848b368edda047eb5c96daad14aadc42ff9d997 /libavformat/asf-enc.c | |
parent | 8767060cd2e5f9a29251f90b98b0f0cdafad93ef (diff) |
Correct ASF duration.
Patch by Henrik Gulbrandsen: henrik gulbra net
Originally committed as revision 12916 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/asf-enc.c')
-rw-r--r-- | libavformat/asf-enc.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libavformat/asf-enc.c b/libavformat/asf-enc.c index a12cda1e7c..6bd89f4e1e 100644 --- a/libavformat/asf-enc.c +++ b/libavformat/asf-enc.c @@ -733,11 +733,10 @@ static int asf_write_packet(AVFormatContext *s, AVPacket *pkt) 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); |