summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/asf-enc.c3
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);