# HG changeset patch # User zuxy # Date 1180514198 0 # Node ID 8a0062b81dcc026db84dde66a39d96e455e3d601 # Parent 69bf352bcef8e56aa98635cc121a448d3900227a Use play duration instead of send duration to calculate the length of an ASF clip. diff -r 69bf352bcef8 -r 8a0062b81dcc libmpdemux/asfheader.c --- a/libmpdemux/asfheader.c Wed May 30 07:07:32 2007 +0000 +++ b/libmpdemux/asfheader.c Wed May 30 08:36:38 2007 +0000 @@ -588,7 +588,7 @@ asf->packetsize=fileh->max_packet_size; asf->packet=malloc(asf->packetsize); // !!! asf->packetrate=fileh->max_bitrate/8.0/(double)asf->packetsize; - asf->movielength=fileh->send_duration/10000000LL; + asf->movielength=(fileh->play_duration-fileh->preroll)/10000000LL; } // find content header