comparison libmpdemux/asfheader.c @ 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 296ddce42cea
comparison
equal deleted inserted replaced
29838:ccb6a75dedf7 29839:a2a009b24502
542 (int)fileh->min_packet_size, (int)fileh->max_packet_size, 542 (int)fileh->min_packet_size, (int)fileh->max_packet_size,
543 (int)fileh->max_bitrate, (int)fileh->preroll); 543 (int)fileh->max_bitrate, (int)fileh->preroll);
544 asf->packetsize=fileh->max_packet_size; 544 asf->packetsize=fileh->max_packet_size;
545 asf->packet=malloc(asf->packetsize); // !!! 545 asf->packet=malloc(asf->packetsize); // !!!
546 asf->packetrate=fileh->max_bitrate/8.0/(double)asf->packetsize; 546 asf->packetrate=fileh->max_bitrate/8.0/(double)asf->packetsize;
547 asf->movielength=(fileh->play_duration-10000*fileh->preroll)/10000000LL; 547 asf->movielength=(fileh->play_duration-10000*fileh->preroll)/10000000.0;
548 } 548 }
549 549
550 // find content header 550 // find content header
551 pos = find_asf_guid(hdr, asf_content_desc_guid, 0, hdr_len); 551 pos = find_asf_guid(hdr, asf_content_desc_guid, 0, hdr_len);
552 if (pos >= 0) { 552 if (pos >= 0) {