[MPlayer-cvslog] r29881 - in trunk/libmpdemux: asf.h asfheader.c

reimar subversion at mplayerhq.hu
Tue Nov 10 17:24:17 CET 2009


Author: reimar
Date: Tue Nov 10 17:24:16 2009
New Revision: 29881

Log:
Calculate length of ASF files with more than 1 second precision.
Based on patch by On2.

Modified:
   trunk/libmpdemux/asf.h
   trunk/libmpdemux/asfheader.c

Modified: trunk/libmpdemux/asf.h
==============================================================================
--- trunk/libmpdemux/asf.h	Tue Nov 10 17:19:44 2009	(r29880)
+++ trunk/libmpdemux/asf.h	Tue Nov 10 17:24:16 2009	(r29881)
@@ -222,7 +222,7 @@ struct asf_priv {
     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;

Modified: trunk/libmpdemux/asfheader.c
==============================================================================
--- trunk/libmpdemux/asfheader.c	Tue Nov 10 17:19:44 2009	(r29880)
+++ trunk/libmpdemux/asfheader.c	Tue Nov 10 17:24:16 2009	(r29881)
@@ -544,7 +544,7 @@ int read_asf_header(demuxer_t *demuxer,s
       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


More information about the MPlayer-cvslog mailing list