changeset 29839:a2a009b24502

Calculate length of ASF files with more than 1 second precision. Based on patch by On2.
author reimar
date Tue, 10 Nov 2009 16:24:16 +0000
parents ccb6a75dedf7
children efa22f9d6b76
files libmpdemux/asf.h libmpdemux/asfheader.c
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/asf.h	Tue Nov 10 16:19:44 2009 +0000
+++ b/libmpdemux/asf.h	Tue Nov 10 16:24:16 2009 +0000
@@ -222,7 +222,7 @@
     int scrambling_b;
     unsigned packetsize;
     double   packetrate;
-    unsigned movielength;
+    double movielength;
     int asf_is_dvr_ms;
     uint32_t asf_frame_state;
     int asf_frame_start_found;
--- a/libmpdemux/asfheader.c	Tue Nov 10 16:19:44 2009 +0000
+++ b/libmpdemux/asfheader.c	Tue Nov 10 16:24:16 2009 +0000
@@ -544,7 +544,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->play_duration-10000*fileh->preroll)/10000000LL;
+      asf->movielength=(fileh->play_duration-10000*fileh->preroll)/10000000.0;
   }
 
   // find content header