comparison libmpdemux/asfheader.c @ 29838:ccb6a75dedf7

Fix length calculation for ASF, preroll is in ms, play time in 100 ns. Based on patch by On2
author reimar
date Tue, 10 Nov 2009 16:19:44 +0000
parents 4a1c217a844b
children a2a009b24502
comparison
equal deleted inserted replaced
29837:569856f892d9 29838:ccb6a75dedf7
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-fileh->preroll)/10000000LL; 547 asf->movielength=(fileh->play_duration-10000*fileh->preroll)/10000000LL;
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) {