CRACK.cd

Don't Pay, We Know Another Way!

Ads

DIVFIX V1.08

Download the crack/serial/keygen for "DivFix v1.08".
Download with DSL speed using USENExT.

NFO

History.txt: 1.08 - All the functions can be used with command-line parameters now (use DivFi& #120; /? for help) - Logging will redirect the messages into a log-file - The backup file can be saved in other places than the current directory - Read-only files now can be opened - At the error messages DivFix does not count audio frames into the rep orted error position - The '.DivFix' extension went to the front of the filenam e - New DivFix logo (Thanks to Attila Kárpáti), clicking on it will jump to the 'official' DivFix homepage ( http://divfix.maxeline.com ). - Few little bugfix - Perl version of DivFix included (Thanks to David Hoffman for the tran slation) 1.07 - The processing speed is greatly improved when DivFix is dealing with corrupted parts of the avi - DivFix no longer stops responding until processing corrupted parts - With the "Keep the original file" setting, DivFix will make i ndex rebuilding on a backup copy (the new file will have the same name plus the '.DivFi 0;' extension. - With the "Cut out the bad parts" setting, DivFix will not cop y the corrupted frames into the backup file 1.06 Changes in the Win32 version: - Fixed a few I/O error bug (Thanks to Kimmo Hassinen for sending me vi deos wich produce the errors) - Fixed the bug in the Stayontop feature which ceased to function prope rly after turning it off and turning back - DivFix is now working with OpenDML videos containing interleaved inde xes - Stop button for interrupting the rebuilding or error checking process - DivFix can be used now with command-line parameters to batch-process multiple files (see it at the Usage part of this document). Whith that, i think the DOS version is no longer necessary (and i remove it from the archive), especia lly not, because it was not updated with the changes in the Win32 version. - The executable is now compressed with the UPX compression utility (Th anks to Volker Wiens for the suggestion) - The archive is now contain the source code and released under the GNU Publ ic License (see License.txt for the details) 1.05 Changes in the Win32 version: - Fixed two bug causing I/O errors - Fixed a possible bug which cause truncating the avi (i hope this prob lem is now eliminated) - Added the error-checking function, but this check is not 100% bulletproof, because it will detect faulty frames only if the frame-header is damaged t oo. - For a request, DivFix show the position where the corrupted frame was found. 1.04 Changes in the Win32 version: - Fixed a bug caused DivFix to cut the avi to the size of the prev ious size after a rebuild,strip and resume. Sorry for those who had problems from th is... - Added a nice progress indicator. - Changed the Regenerate in the File menu to Rebuild. That has the same func tion as the button, i just forgott to rename it and a few people found it confu sing. 1.03 Changes in the Win32 version: - Fixed another cause for "I/O Error" bug. If a frame header wa s corrupted, DivFix stopped with this error. Now it will give you an error message , where the corrupted frame was and continue the searching for the next valid frame. The corrupted frame will not be in the index, but if you still experience problems (frozen picture during playback), the only soluti on is cutting the damaged frame out with VirtualDub (or with any other editor). The error detection is not perfect, it only scan the frame header. So if the damage is only in the frame data and the header is perfect, DivFix ; will not notice it (and the video will freeze). - Added a scroll bar to the status display to see the error messages, if there is too much... - Fixed the problem with seeking in some movies after using DivFix . - The About window is no longer sizable (Thanks to Atte for detecting this serious security hole! :)) 1.02 Changes in the Win32 version: - At least fixed that annoying "I/O Error" bug... :) 1.01 Changes in the Win32 version: - you can change if you want the DivFix window stay on the top (usefull for drag-and-drop) - you can open the files with drag-and-drop (Thanks for Angus Johnson and Anders Melander for their Drag and Drop Component Suite) - Fixed the bug with the "Read beyond end of file" error - This new readme file... :) 1.0 First version (without version number) This version was not intended for global distribution (so, sorry for the missi ng readme file :) License.txt: GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02 9;11-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRAN TY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS ED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. <one line to give the program's name and a brief idea of what it doe s.> Copyright (C) <year> <name of author> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 021 ;11-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w' . This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropri ate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. <signature of Ty Coon>, 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. Perl version/AVISTRIP: #!/usr/bin/env perl die "Usage: $0 avifile ...\n" if $#ARGV < 0; foreach $filename (@argv) { open AVIFILE,"+<$filename" or die "Cannot open $filename: $!\ n"; seek AVIFILE,8,0 or die "Failed seeking to position 8 of $filena me\n"; read AVIFILE,$chunkname,8; if ($chunkname ne "AVI LIST") { die "$filename: Not an AVI file\n"; } $pos=16; $size=0; do { $pos += $size; seek AVIFILE,$pos,0 or die "Failed seeking to position $pos in $file name\n"; if ((read AVIFILE,$nextsize,4) != 4) { die "Couldn't read size a t $pos in $filename\n"; } $size = unpack "i",$nextsize; if ((read AVIFILE,$chunkname,4) != 4) { die "Couldn't read name at $p os in $filename\n"; } $pos += 8; } while ($chunkname ne "movi"); $streamstart = $pos - 4; $streamsize = $size; if (($streamstart + $streamsize) / ( -s $filename) < 0.75) { die "Refusing to truncate $filename at " . ($streamstart + $streamsize ) . " - ratio suspiciously high\n"; } truncate AVIFILE,$streamstart + $streamsize or die "Cannot truncate inde& #120; in $filename\n"; seek AVIFILE,$streamstart - 4,0 or die "Cannot seek to start of stream in $filename, whatever that means\n"; print AVIFILE pack "i",$streamsize; close AVIFILE; } Perl version/DIVFIX: #!/usr/bin/env perl use Getopt::Std; $KeyFrame = 16; $NormFrame = 0; sub writeint { my $fh = shift; my $i = shift; print $fh pack "i",$i; } sub readint { my $fh = shift; my $buf; read $fh,$buf,4; return unpack "i",$buf; } if (!getopts('vbd') || $#ARGV < 0) { die <<"END"; Usage: $0 [-v] [-b[d]] avifile ... -v: verbose, progress meter -b: keep backup -d: discard bad parts (only valid with -b) END } $KeepBackup = $opt_b; $DiscardBadParts = $opt_d; $verbose = $opt_v; foreach $filename (@ARGV) { $InputSize = -s $filename; $OutputName = $filename . ".tmp.idx"; $BackupName = $filename . ".DivFix"; open Input,"+<$filename" or die "Cannot open $filename: $!\n& #34;; open Output,"+>$OutputName" or die "Cannot open temporary fil e $OutputName: $!\n"; if ($KeepBackup) { open Backup,">$BackupName" or do { unlink $OutputName; die "Cannot open $BackupName: $!\n"; } } seek Input,8,0; read Input,$ChunkName,8; if ($ChunkName ne 'AVI LIST') { die "$filename: not an AVI file.\n& #34;; } if ($verbose) { print "Rebuilding index of $filename...\n"; } $Position=16; $Size=0; do { $Position += $Size; seek Input,$Position,0; $Size = readint(Input); read Input,$ChunkName,4; $Position += 8; } until ($ChunkName eq 'movi'); $StreamStart=$Position-4; $StreamSize=$Size; $ChunkName='idx1'; print Output $ChunkName; writeint(Output,$Size); $Position=4; $i=0; $Frame=0; $Difference=0; $Interleaved=0; seek Input,0,0; if ($KeepBackup) { read Input,$Buffer,$StreamStart+4; print Backup $Buffer; } do { if ($verbose) { printf "%2.1f% \r", $Position * 100.0 / $Inp utSize; } seek Input,$StreamStart+$Position,0; if (! eof Input) { BStartRead: read Input,$ChunkName,4; if ($ChunkName eq 'LIST') { seek Input,8,1; $Position += 12; goto BStartRead; } if ($ChunkName eq 'JUNK') { $Size = readint(Input); $Position += $Size+8; seek Input,$StreamStart+$Position,0; goto BStartRead; } if ((substr($ChunkName,0,2) eq 'ix') || (substr($ChunkName,2, 2) eq 'ix')) { seek Input,12,1; $Position += 16; seek Input,$StreamStart+$Position,0; $Interleaved=1; goto BStartRead; } if (! eof Input) { # if ((($ChunkName[1] In Number) && ($ChunkName[2] In Number)) && ((Copy ($ChunkName,3,2) eq 'dc') || (Copy($ChunkName,3,2) eq 'db') || ( Copy($ChunkName,3,2) eq 'wb'))) if ($ChunkName =~ m/^\d\d(dc|db|wb)/o) { $Frame++; if ($Interleaved) { seek Input,-16,1; $Position -= 16; $Interleaved=0; } $Temp = read Input,$TempBuf,4; $Size = unpack "i",$TempBuf; if (($Size<0) && ($Temp==4)) { $Position += 4; seek Input,$StreamStart+$Position,0; read Input,$ChunkName,4; if ($ChunkName eq 'LIST') { seek Input,8,1; $Position += 12; goto BStartRead; } if ($ChunkName eq 'JUNK') { $Size = readint(Input); $Position += $Size+8; seek Input,$StreamStart+$Position,0; goto BStartRead; } seek Input,$StreamStart+$Position,0; goto BError; } if (! eof Input) { read Input,$FrameType,1; $j=((($Position+$Size) >> 1)+(($Position+$Size) % 2))*2+8; seek Input,$StreamStart+$j-1,0; if (! eof Input) { if (length($ChunkName) != 4) { $ChunkName = substr($ChunkName . " ",0,4); } print Output $ChunkName; # if (((Copy($ChunkName,3,2) eq 'dc') || (Copy($ChunkName,3,2) eq &# 39;db') || (Copy($ChunkName,3,2) eq 'wb')) && (($ChunkName[1] In Number) && ($ChunkName[2] In Number)) && (($FrameType & 64)==0)) if ($ChunkName =~ m/^\d\d(dc|db|wb)/o && (($FrameType & 64)==0)) { writeint(Output,$KeyFrame) } else { writeint(Output,$NormFrame); } if ($DiscardBadParts) { $j=$Position-$Difference; writeint(Output,$j) } else { writeint(Output,$Position); } writeint(Output,$Size); $j=$Position; $Position=((($Position+$Size) >> 1)+(($Position+$Size) % 2))*2+8 ; seek Input,$StreamStart+$j,0; if ($KeepBackup) { if ($Position-$j>32768) { for ($k=1;$k <= int (($Position-$j) / 32768);$k++) { read Input,$Buffer,32768; print Backup $Buffer; } read Input,$Buffer,(($Position-$j) % 32768); print Backup $Buffer; } else { read Input,$Buffer,$Position-$j; print Backup $Buffer; } } $i++; } } } else { BError: if ($ChunkName ne 'idx1') { print " Corrupted data detected at frame $$Frame\n"; print " Error offset: ",$StreamStart+$Position,"\n"; # Shouldn't this > be a >= if (tell Output > 16) { seek Output,-16,1; } $j=$Position; do { seek Input,$StreamStart+$Position,0; if (! eof Input) { read Input,$Buffer,32768; $k=1; do { if (((substr($Buffer,$k-1,1) eq 'd') || (substr($Buffer,$k- 1,1) eq 'w')) && (! eof Input)) { if (((substr($Buffer,$k,1) eq 'c') || (substr($Buffer,$k,1 ;) eq 'b')) && (! eof Input)) { seek Input,$StreamStart+$Position+$k-3,0; if (! eof Input) {read Input,$ChunkName,4; } } } $k++; # right-brace until ((((Copy($ChunkName,3,2) eq 'dc') || (Copy($Ch unkName,3,2) eq 'db') || (Copy($ChunkName,3,2) eq 'wb')) && (($C hunkName[1] In Number) && ($ChunkName[2] In Number))) || ($ChunkName eq ' ;idx1') || ($k>32768)); } until (($ChunkName =~ m/^\d\d(dc|db|wb)/o) || ($ChunkName eq 'id 0;1') || ($k>32768)); } $Position += $k-3; # right-brace until ((((Copy($ChunkName,3,2) eq 'dc') || (Copy($Chu nkName,3,2) eq 'db') || (Copy($ChunkName,3,2) eq 'wb')) && (($Ch unkName[1] In Number) && ($ChunkName[2] In Number))) || ($ChunkName eq ' idx1') || eof Input); } until (($ChunkName =~ m/^\d\d(dc|db|wb)/o) || ($ChunkName eq 'idx ;1') || eof Input); if (! eof Input) { $Position--; } if ($KeepBackup) { if (!($DiscardBadParts)) { seek Input,$StreamStart+$j,0; if ($Position-$j>32768) { for ($k=1; $k <= int (($Position-$j) / 32768);$k++) { read Input,$Buffer,32768; print Backup $Buffer; } read Input,$Buffer,(($Position-$j) % 32768); print Backup $Buffer; } else { read Input,$Buffer,$Position-$j; print Backup $Buffer; } } else { $Difference+=$Position-$j; } } } else { seek Input,6,1; read Input,$ChunkName,2; seek Input,-8,1; if (($ChunkName eq 'dc') || ($ChunkName eq 'wb') || ($Chunk Name eq 'db')) { $ChunkName='idx1'; } else { $ChunkName='0000'; goto BError; } } } } } } until ((eof Input) || ($ChunkName eq 'idx1')); $Size=$i*16; seek Output,4,0; writeint(Output,$Size); if ($KeepBackup) { seek Backup,0,2; $StreamSize=tell(Backup) - $StreamStart; seek Backup,$StreamStart-4,0; writeint(Backup,$StreamSize); seek Backup,$StreamStart+$StreamSize,0; seek Output,0,0; do { $Temp = read Output,$Buffer,32768; print Backup $Buffer; } until (!($Temp==32768)); truncate Backup, tell Backup; close Backup; } else { seek Input,0,2; $StreamSize=tell(Input) - $StreamStart; seek Input,$StreamStart-4,0; writeint(Input,$StreamSize); seek Input,$StreamStart+$StreamSize,0; seek Output,0,0; do { $Temp = read Output,$Buffer,32768; print Input $Buffer; } until (!($Temp==32768)); truncate Input, tell Input; } close Input; close Output; unlink $OutputName; if ($verbose) { print "Done. \n"; } } Readme.txt: 1. About This program was created to be able to watch partially downloaded DivX (AVI) mov ies. It can rebuild or strip the index part of the movie, which is at the end of the file. There are also a basic error detection, which can detect serious errors in the a udio/video stream. 2. Usage !!! W A R N I N G !!! For your maximum safety, you should use this program on a backup copy first to avoid problems from possible bugs and from continuing the download later without strip ping the index. If you want to continue the download later, don't forget to strip the inde&# 120;! !!! W A R N I N G !!! If you have a partially downloaded movie and you want to look in it, then open t he file with DivFix and use the "Rebuild Index" function. Now you can look the movie. If you want to continue the download, open the file again with DivFix, use the "Str ip Index" function, finish the download and then use the "Rebuild Index" again to corre ct the file-size in the AVI header (the only data which is changed by DivFix from the original movi e). You can use DivFix with command-line parameters too (and you can use wildca rds). For detailed help on the parameters use "DivFix.exe /?". 3. Known bugs: Keyframe detection seems to be not perfect with DivX5 AVIs. There should be still some I/O-error (but hey, this is the first and only program i made with Borland Delphi... :). If you can send me a video that produce such error, i will try to fix it. But if you send meg bug-report, PLEASE write down the version number too... :) 4. Future plans: I want to put some registry handling in DivFix to remember the last se ttings and maybe to make Shell extension to the AVI files. Maybe there will be versions for other platforms (MacOS, Linux). If so mebody can do the compiling of the new versions on other platforms, i will put them in th e archive. 6. Copyright Copyright (C) 2000-2002 Csaba Budai This program is released under the GNU General Public License. It may be used fr eely, and you are welcome to redistribute it under certain conditions. For details, pl ease read the file License.txt which comes with this archive. If not, please con tact me for the original archive. 7. Contact addresses You can download the recent DivFix versions from the 'official' Div Fix page: http://divfix.maxel ine.com If you like this program, you should send a postcard (with a nice picture about your city or country) or $5 (but you are not forced to do so, because this is a freeware utility) to the following address: Budai Csaba Tatabanya Sarberek 603. II/6. 2800 Hungary You can send bugreports (please include the version number!!!), suggestions, etc . to the following e-mail address: divfix@freemail.hu or you can speak with me on the following ICQ number: UIN: 91811374 Meanwhile i lost my previous e-mail addres at the usa.net and with it a few unan swered mail. Sorry for those i did not answer (because of that) or answered later (beca use i have a few life-related problems and that's why i was late with the new version). Special thanks to Kimmo Hassinen and Arty (arty@freemail.hu) for the beta testin g! Yes, you can send those mail-bombs to him in case of any damage, that my program do for you... :) Source/About.pas: {DivFix is a utility for reindexing partial DivX AVI movies Copyright (C) 2000-2002 Csaba Budai This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 021 9;1-1307 USA} unit About; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ExtCtrls, ShellApi; type TForm2 = class(TForm) StaticText1: TStaticText; Button1: TButton; StaticText2: TStaticText; StaticText4: TStaticText; StaticText5: TStaticText; StaticText6: TStaticText; StaticText7: TStaticText; StaticText3: TStaticText; Bevel1: TBevel; StaticText8: TStaticText; Bevel2: TBevel; StaticText9: TStaticText; StaticText10: TStaticText; Bevel3: TBevel; StaticText11: TStaticText; StaticText12: TStaticText; Memo1: TMemo; Bevel4: TBevel; procedure Button1Click(Sender: TObject); procedure SendEMail(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form2: TForm2; implementation {$R *.DFM} procedure TForm2.Button1Click(Sender: TObject); begin Form2.Close; end; procedure TForm2.SendEMail(Sender: TObject); begin ShellExecute(0,'open',pchar('mailto:divfix@freemail.h u'),nil,nil,SW_NORMAL); end; end. Source/DivFix.dof: [Compiler] A=1 B=0 C=1 D=1 E=0 F=0 G=1 H=1 I=1 J=1 K=0 L=1 M=0 N=1 O=1 P=1 Q=0 R=0 S=0 T=0 U=0 V=1 W=0 X=1 Y=0 Z=1 ShowHints=1 ShowWarnings=1 UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs= BDE; [Linker] MapFile=0 OutputObjs=0 ConsoleApp=1 DebugInfo=0 MinStackSize=16384 MaxStackSize=1048576 ImageBase=4194304 ExeDescription= [Directories] OutputDir= UnitOutputDir= SearchPath= Packages=VCL30;VCLX30;VCLDB30;VCLDBX30;VCLSMP30;QRPT30 Conditionals= DebugSourceDirs= UsePackages=0 [Parameters] RunParams= HostApplication= [Version Info] IncludeVerInfo=1 AutoIncBuild=0 MajorVer=1 MinorVer=0 Release=8 Build=0 Debug=0 PreRelease=0 Special=0 Private=0 DLL=0 Locale=1038 CodePage=1250 [Version Info Keys] CompanyName=Budai Csaba FileDescription=Utility for reindexing DivX AVI files FileVersion=1.0.8.0 InternalName= LegalCopyright=Copyright (C) 2000-2002 Csaba Budai LegalTrademarks= OriginalFilename=DivFix.exe ProductName=DivFix ProductVersion=1.08 Comments=This program is released under the terms of the GNU General Public Lice nse Source/DivFix.dpr: {DivFix is a utility for reindexing partial DivX AVI movies Copyright (C) 2000-2002 Csaba Budai This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 021 9;1-1307 USA} program DivFix; uses Forms, SysUtils, DivX in 'DivX.pas' {Form1}, About in 'About.pas' {Form2}, Parameters in 'Parameters.pas' {Form3}; Var SearchRec : TSearchRec; StripIndex : Boolean; ErrorCheck : Boolean; WildCard : Boolean; i : Byte; {$R *.RES} begin StripIndex:=False; ErrorCheck:=False; WildCard:=False; Application.Initialize; Application.CreateForm(TForm1, Form1); Application.CreateForm(TForm2, Form2); Application.CreateForm(TForm3, Form3); If ParamCount>0 Then Begin If (ParamStr(1)='/?') Or (ParamStr(1)='-h') Or (Para mStr(1)='-H') Then Begin Form3.Button1.Cancel:=True; Form3.Show; Form3.Refresh; Repeat Application.ProcessMessages; Until Not (Form3.Button1.Cancel); Exit; End; If ParamCount>1 Then Begin i:=2; Repeat If (ParamStr(i)='-r') Or (ParamStr(i)='-R') Then StripInde& #120;:=True Else If (ParamStr(i)='-e') Or (ParamStr(i)='-E') Then Er rorCheck:=True Else If (ParamStr(i)='-o') Or (ParamStr(i)='-O') Then Begin Form1.CheckBox1.Checked:=True; If (i<ParamCount) And (ParamStr(i+1)[1]<>'- 9;) Then Begin Inc(i); Form1.MaskEdit2.Text:=ParamStr(i); End Else WildCard:=True; End Else If (ParamStr(i)='-c') Or (ParamStr(i)='-C') Then Fo rm1.CheckBox2.Checked:=True Else If (ParamStr(i)='-l') Or (ParamStr(i)='-L') Then Begin Form1.CheckBox3.Checked:=True; If (i<ParamCount) And (ParamStr(i+1)[1]<>'- 9;) Then Begin Inc(i); Form1.MaskEdit3.Text:=ParamStr(i); End Else Form1.MaskEdit3.Text:='DivFix.log'; End; Inc(i); Until i>ParamCount; If FindFirst(ParamStr(1),faAnyFile,SearchRec)=0 Then Begin Repeat Form1.MaskEdit1.Text:=ExtractFilePath(ParamStr(2))+Se archRec.Name; If WildCard Then Form1.MaskEdit2.Text:=Form1.MaskEdit1 .Text+'.DivFix'; Form1.Show; Form1.Refresh; If StripIndex Then Form1.Button2Click(nil) Else If ErrorCheck Then Form1.Button3Click(nil) Else Form1.Button1Click(nil); Until FindNext(SearchRec)<>0; FindClose(SearchRec); End; End Else Begin If FindFirst(ParamStr(1),faAnyFile,SearchRec)=0 Then Begin Repeat Form1.MaskEdit1.Text:=ExtractFilePath(ParamStr(1) )+SearchRec.Name; If WildCard Then Form1.MaskEdit2.Text:=Form1.MaskEdit1 ;.Text+'.DivFix'; Form1.Show; Form1.Refresh; Form1.Button1Click(nil); Until FindNext(SearchRec)<>0; FindClose(SearchRec); End; End; End Else Application.Run; end. Source/DivFix.dsk: [MainWindow] Create=1 Visible=1 State=2 Left=0 Top=0 Width=1024 Height=106 MaxLeft=-4 MaxTop=-4 MaxWidth=1032 MaxHeight=106 ClientWidth=1024 ClientHeight=60 [WatchWindow] Create=1 Visible=1 State=0 Left=189 Top=585 Width=837 Height=156 MaxLeft=-1 MaxTop=-1 ClientWidth=829 ClientHeight=129 [ProjectManager] LargeButtons=1 Column0Width=75 Column1Width=125 Column2Width=125 [PropertyInspector] Create=1 Visible=1 State=0 Left=-2 Top=101 Width=194 Height=641 MaxLeft=-1 MaxTop=-1 ClientWidth=186 ClientHeight=617 SplitPos=84 [HistoryLists\hiWatchExpression] Count=22 H0=Frametype And 64 H1=Frame H2=ChunkName H3=Frametype H4=Output H5=Input H6=ParamCount H7=ParamStr(3) H8=ParamStr(1) H9=ParamStr H10=i H11=WildCard H12=Temp H13=FilePos(Output) H14=FilePos(Log) H15=Log H16=Filepos(input) H17=ioresult H18=Text H19=indexstart H20=LastBackupPosition H21=LastIndexPosition [HistoryLists\hiOpenFile] Count=4 H0=e:\program files\borland\delphi 3\projects\divx\about.pas H1=e:\program files\borland\delphi 3\projects\divx\divx.pas H2=e:\divfix\source\about.pas H3=e:\divfix\source\divx.pas [HistoryLists\hiRunParams] Count=4 H0=-h H1=e:\d\divfix\ppp\*.avi -l H2=e:\d\divfix\ppp\*.avi -o H3=e:\d\divfix\ppp\*.avi -o -l [HistoryLists\hiUnitAlias] Count=1 H0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; [HistoryLists\hiLibUnitAliases] Count=1 H0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; [HistoryLists\hiPakDLLOutputDir] Count=0 [HistoryLists\hiPakDCPOutputDir] Count=0 [Closed Files] File_0=SourceModule,'E:\Program Files\Borland\Delphi 3\Projects\DivX\Par ameters.pas',0,1,22,1,40,1,0 File_1=SourceModule,'E:\Program files\Borland\Delphi 3\Source\DragDrop\C omponents\DropTarget.pas',0,1,545,1,563,0,0 File_2=SourceModule,'E:\Program files\Borland\Delphi 3\Source\DragDrop\Compo nents\DropSource.pas',0,1,1046,1,1056,0,0 ; File_3=SourceModule,'E:\Program Files\Borland\Delphi 3\Projects\DivX\About.p as',0,1,49,1,67,0,0 File_4=SourceModule,'e:\Program Files\Borland\Delphi 3\Projects\DivX\DivFi&# 120;.dpr',0,1,1,1,1,0,0 File_5=SourceModule,'e:\Program Files\Borland\Delphi 3\Projects\DivX\About.d fm',0,1,10,1,10,0,0 File_6=SourceModule,'e:\PROGRA~1\BORLAND\DELPHI~1\PROJECTS\DIVX\DivF ix.dpr',0,1,1,1,1,0,0 File_7=PackageEditModule,'e:\Program Files\Borland\Delphi 3\Source\DragDrop\ Components\DragDropD3.dpk',0,200,104,585,401, 9; [Modules] Module0=E:\Program Files\Borland\Delphi 3\Projects\DivX\DivX.pas Module1=E:\Program Files\Borland\Delphi 3\Projects\DivX\DivFix.dpr Count=2 EditWindowCount=1 [E:\Program Files\Borland\Delphi 3\Projects\DivX\DivX.pas] ModuleType=SourceModule FormState=1 FormOnTop=0 [E:\Program Files\Borland\Delphi 3\Projects\DivX\DivFix.dpr] ModuleType=SourceModule FormState=0 FormOnTop=0 [EditWindow0] Create=1 Visible=1 State=0 Left=191 Top=101 Width=836 Height=487 MaxLeft=-4 MaxTop=98 ClientWidth=828 ClientHeight=460 SplitPos=50 MessagePane=0 ViewCount=2 CurrentView=1 View0=0 View1=1 [View0] Module=E:\Program Files\Borland\Delphi 3\Projects\DivX\DivFix.dpr CursorX=1 CursorY=1 TopLine=1 LeftCol=1 [View1] Module=E:\Program Files\Borland\Delphi 3\Projects\DivX\DivX.pas CursorX=1 CursorY=1 TopLine=1 LeftCol=1 [Watches] Count=4 Watch0='Frametype',256,0,18,1 Watch1='ChunkName',256,0,18,1 Watch2='Frame',256,0,18,1 Watch3='Frametype And 64',256,0,18,1 [Breakpoints] Count=0 Source/DivFix.res: ˙˙˙˙( ˙˙˙˙(  └€€€€€€€€€└└└€€€˙˙˙˙˙˙˙ ˙˙˙˙˙ˆˆˆˆˆˆ˙˙˙˙˙řůůü╠ňř˙Ÿ˙╧ňřůůüüňř˙Ÿ˙╧ňř˙˙˙˙˙ř đđđđđđ╗╗ˆ˙ˆđ€ˆ˙ˆ€└€€€€€ €€€€€ƒ˙└đ ˙╟0˙˙MAINICON u(╚ ˙˙˙˙╚4VS_VE RSION_INFO╜ď ?& StringFileInfo040E04E28Com panyNameBudai CsabatLFileDescription Utility for reindexing DivX AVI file s0FileVersion1.0.8.0!Int ernalNamenJLegalCopyrightCopyright (C) 2000-2002 Csaba Budai) LegalTrademarks>OriginalFilenam eDivFix.exe.ProductNameDivFi x. ProductVersion1.08Ž–CommentsTh is program is released under the terms o f the GNU General Public LicenseDVar FileInfo$Translationâ Source/DivX.pas: {DivFix is a utility for reindexing partial DivX AVI movies Copyright (C) 2000-2002 Csaba Budai This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 021 9;1-1307 USA} unit DivX; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, Mask, Menus, ExtCtrls, Buttons, DropSource, DropTarget, ComCtrls, OleCtnrs, ShellApi; type TForm1 = class(TForm) Button1: TButton; Button2: TButton; Button3: TButton; MaskEdit1: TMaskEdit; OpenDialog1: TOpenDialog; MainMenu1: TMainMenu; File1: TMenuItem; Help1: TMenuItem; About1: TMenuItem; Open1: TMenuItem; Regenerate1: TMenuItem; Strip1: TMenuItem; Exit1: TMenuItem; Panel1: TPanel; SpeedButton1: TSpeedButton; Memo1: TMemo; Window1: TMenuItem; Stayontop1: TMenuItem; DropFileTarget1: TDropFileTarget; ProgressBar1: TProgressBar; Check1: TMenuItem; Stop: TButton; CheckBox1: TCheckBox; CheckBox2: TCheckBox; MaskEdit2: TMaskEdit; SpeedButton2: TSpeedButton; SaveDialog1: TSaveDialog; Image1: TImage; SpeedButton3: TSpeedButton; MaskEdit3: TMaskEdit; OpenDialog2: TOpenDialog; CheckBox3: TCheckBox; procedure SpeedButton1Click(Sender: TObject); procedure Button1Click(Sender: TObject); procedure Button2Click(Sender: TObject); procedure Exit1Click(Sender: TObject); procedure About1Click(Sender: TObject); procedure StayTop(Sender: TObject); procedure FormCreate(Sender: TObject); procedure FormDestroy(Sender: TObject); procedure DropFileTarget1Drop(Sender: TObject; ShiftState: TShiftState; Point: TPoint; var Effect: Integer); procedure Button3Click(Sender: TObject); procedure StopClick(Sender: TObject); procedure CheckBox1Click(Sender: TObject); procedure SpeedButton2Click(Sender: TObject); procedure SpeedButton3Click(Sender: TObject); procedure CheckBox3Click(Sender: TObject); procedure ShowWebPage(Sender: TObject); private { Private declarations } public Input,Output : File; Backup : File; Log : Text; i,j : Cardinal; Size,Position : Cardinal; StreamStart : Cardinal; StreamSize : Cardinal; Difference : Cardinal; Frame : Cardinal; LastInputPosition : Cardinal; LastIndexPosition : Cardinal; LastBackupPosition : Cardinal; Interleaved : Boolean; OnTop : Boolean; StopButton : Boolean; Logging : Boolean; Chunkname : String[8]; Temp : integer; FrameType : Byte; Buffer : Array [0..32800] Of Byte; Text : String; Text2 : String[2]; end; Const KeyFrame : Longint = 16; NormFrame : Longint = 0; Number : Set of char =['0'..'9']; var Form1: TForm1; implementation uses About; {$R *.DFM} procedure DisableButtons; begin Form1.SpeedButton1.Enabled:=False; Form1.SpeedButton2.Enabled:=False; Form1.SpeedButton3.Enabled:=False; Form1.MaskEdit1.Enabled:=False; Form1.MaskEdit2.Enabled:=False; Form1.MaskEdit3.Enabled:=False; Form1.Button1.Enabled:=False; Form1.Button2.Enabled:=False; Form1.Button3.Enabled:=False; Form1.CheckBox1.Enabled:=False; Form1.CheckBox2.Enabled:=False; Form1.CheckBox3.Enabled:=False; end; procedure EnableButtons; begin Form1.SpeedButton1.Enabled:=True; Form1.MaskEdit1.Enabled:=True; If Form1.CheckBox1.Checked Then Begin Form1.SpeedButton2.Enabled:=True; Form1.MaskEdit2.Enabled:=True; End; If Form1.CheckBox3.Checked Then Begin Form1.SpeedButton3.Enabled:=True; Form1.MaskEdit3.Enabled:=True; End; Form1.Button1.Enabled:=True; Form1.Button2.Enabled:=True; Form1.Button3.Enabled:=True; Form1.CheckBox1.Enabled:=True; If Form1.CheckBox1.Checked Then Form1.CheckBox2.Enabled: =True; Form1.CheckBox3.Enabled:=True; end; procedure WriteOut(Text : String); begin If Form1.Logging Then Writeln(Form1.Log,Text) Else Form1.Memo1.Lines.Insert(0,Text); end; function CheckOtherIndex(Var Input : File) : Cardinal; Var Position,i : Cardinal; OldPosition : Cardinal; Buffer : Array [0..32800] of Byte; Idx : String[4]; Temp : Integer; begin OldPosition:=FilePos(Input); Position:=FileSize(Input); i:=32768; Idx:=' '; If Position>32768 Then Repeat Dec(Position,32764); Seek(Input,Position); BlockRead(Input,Buffer,32768,Temp); i:=Temp; Repeat Dec(i); Move(Buffer[i],Idx[1],4); Until (i<0) Or (Idx='idx1'); Until (Position<32768) Or (Idx='idx1'); If (Position<32768) And (Idx<>'idx1') Then Begin i:=Position; Position:=0; Seek(Input,0); Repeat Dec(i); Move(Buffer[i],Idx[1],4); Until (i<0) Or (Idx='idx1'); End; Seek(Input,OldPosition); If Idx='idx1' Then Result:=Position+i Else Result:=0; end; procedure TForm1.SpeedButton1Click(Sender: TObject); begin If OpenDialog1.Execute Then MaskEdit1.Text:=OpenDialog1.F ileName; If MaskEdit1.Text<>'' Then MaskEdit2.Text:=E 0;tractFilePath(MaskEdit1.Text)+ 'DivFix.'+ExtractFileName(MaskEdit1.Text); end; procedure TForm1.SpeedButton2Click(Sender: TObject); begin If SaveDialog1.Execute Then MaskEdit2.Text:=SaveDialog1.FileN ame; end; procedure TForm1.SpeedButton3Click(Sender: TObject); begin If OpenDialog2.Execute Then MaskEdit3.Text:=OpenDialog2.FileName; end; procedure TForm1.Button1Click(Sender: TObject); Var k : Cardinal; Label BError; Label BStartRead; begin Logging:=False; DisableButtons; If MaskEdit1.Text='' Then Begin WriteOut(' No file selected.'); EnableButtons; Exit; End; AssignFile(Input,MaskEdit1.Text); AssignFile(Output,'$TEMP.IDX'); AssignFile(Log,MaskEdit3.Text); If CheckBox1.Checked Then Begin {$I-} FileMode:=0; Reset(Input,1); FileMode:=2; {$I+} End Else Begin {$I-} Reset(Input,1); {$I+} End; If IOResult<>0 Then Begin WriteOut(' Can not open the file.'); EnableButtons; Exit; End; Seek(Input,8); BlockRead(Input,ChunkName[1],8,Temp); ChunkName[0]:=#8; If ChunkName<>'AVI LIST' Then Begin WriteOut(' This is not an AVI file.'); CloseFile(Input); EnableButtons; Exit; End; {$I-} Rewrite(Output,1); {$I+} If IOResult<>0 Then Begin WriteOut(' Cannot create temporary index file.'); CloseFile(Input); EnableButtons; Exit; End; If CheckBox3.Checked Then Begin {$I-} Reset(Log); {$I+} If IOResult<>0 Then Begin {$I-} Rewrite(Log); {$I+} If IOResult<>0 Then Begin WriteOut(' Cannot create log file.'); CloseFile(Input); CloseFile(Output); EnableButtons; Exit; End Else Begin CloseFile(Log); Append(Log); End; End Else Begin CloseFile(Log); Append(Log); End; End; If CheckBox1.Checked Then Begin AssignFile(Backup,MaskEdit2.Text); {$I-} Rewrite(Backup,1); {$I+} If IOResult<>0 Then Begin WriteOut(' Cannot create backup file.'); CloseFile(Input); CloseFile(Output); If CheckBox3.Checked Then CloseFile(Log); Erase(Output); EnableButtons; Exit; End; End; If CheckBox3.Checked Then Begin Logging:=True; WriteOut(' Index rebuilding for file: '+MaskEdit1.Text); End Else WriteOut(' Rebuilding index...'); Position:=16; Size:=0; Chunkname[0]:=#4; Repeat Position:=Position+Size; Seek(Input,Position); BlockRead(Input,Size,4); BlockRead(Input,Chunkname[1],4); Inc(Position,8); Until Chunkname='movi'; StreamStart:=Position-4; StreamSize:=Size; Chunkname:='idx1'; BlockWrite(Output,Chunkname[1],4); BlockWrite(Output,Size,4); LastIndexPosition:=FilePos(Output); Position:=4; i:=0; Frame:=0; Difference:=0; Interleaved:=False; StopButton:=False; Seek(Input,0); If CheckBox1.Checked Then Begin For k:=1 To (StreamStart+4) Div 32768 Do Begin BlockRead(Input,Buffer,32768,Temp); BlockWrite(Backup,Buffer,Temp); End; BlockRead(Input,Buffer,((StreamStart+4) Mod 32768),Temp); BlockWrite(Backup,Buffer,Temp); End; Repeat ProgressBar1.Position:=Position Div ((FileSize(Input)-StreamStart) Div & #49;00); Seek(Input,StreamStart+Position); If Not Eof(Input) Then Begin BStartRead: BlockRead(Input,Chunkname[1],4,Temp); If ChunkName='LIST' Then Begin Seek(Input,FilePos(Input)+8); Inc(Position,12); Goto BStartRead; End; If ChunkName='JUNK' Then Begin BlockRead(Input,Size,4); Position:=Position+Size+8; Seek(Input,StreamStart+Position); Goto BStartRead; End; Text2:=Copy(ChunkName,3,2); If (Copy(ChunkName,1,2)='ix') Or (Text2='ix ') Then Begin Inc(Position,16); Seek(Input,StreamStart+Position); Interleaved:=True; Goto BStartRead; End; If Not Eof(Input) Then Begin If ((ChunkName[1] In Number) And (ChunkName[2] In Number)) And ((Text2='dc') Or (Text2='db') Or (Text 2='wb')) Then Begin If (Text2='dc') Or (Text2='db') Then Inc(Fram e); If Interleaved Then Begin Seek(Input,FilePos(Input)-16); Dec(Position,16); Interleaved:=False; End; BlockRead(Input,Size,4,Temp); If (Size<0) And (Temp=4) Then Begin Inc(Position,4); Seek(Input,StreamStart+Position); BlockRead(Input,Chunkname[1],4,Temp); If ChunkName='LIST' Then Begin Seek(Input,FilePos(Input)+8); Inc(Position,12); Goto BStartRead; End; If ChunkName='JUNK' Then Begin BlockRead(Input,Size,4); Position:=Position+Size+8; Seek(Input,StreamStart+Position); Goto BStartRead; End; Seek(Input,StreamStart+Position); Goto BError; End; If Not Eof(Input) Then Begin LastInputPosition:=Filepos(Input)-4; BlockRead(Input,FrameType,1); j:=(((Position+Size) Div 2)+((Position+Size) Mod 2))*2+8; Seek(Input,StreamStart+j-1); If Not Eof(Input) Then Begin LastIndexPosition:=FilePos(Output); BlockWrite(Output,Chunkname[1],4); Text2:=Copy(ChunkName,3,2); If ((Text2='dc') Or (Text2='db') Or (Text 2='wb')) And ((Chunkname[1]In Number) And (ChunkName[2] In Number)) And (FrameType And 64=0) Then BlockWrite(Output,KeyFrame,4) Else BlockWrite(Output,NormFrame,4); If CheckBox2.Checked Then Begin j:=Position-Difference; BlockWrite(Output,j,4) End Else BlockWrite(Output,Position,4); BlockWrite(Output,Size,4); j:=Position; Position:=(((Position+Size) Div 2)+((Position+Size) Mod 2))*2+8; Seek(Input,StreamStart+j); If CheckBox1.Checked Then Begin LastBackupPosition:=FilePos(Backup); If Position-j>32768 Then Begin For k:=1 To (Position-j) Div 32768 Do Begin BlockRead(Input,Buffer,32768,Temp); BlockWrite(Backup,Buffer,Temp); End; BlockRead(Input,Buffer,((Position-j) Mod 32768),Temp); BlockWrite(Backup,Buffer,Temp); End Else Begin BlockRead(Input,Buffer,Position-j,Temp); BlockWrite(Backup,Buffer,Temp); End; End; Inc(i); End; End; End Else Begin BError: If Chunkname<>'idx1' Then Begin Str(Frame,Text); Text:=' Corrupted data detected at frame '+Text; If FilePos(Output)>16 Then Seek(Output,FilePos(Output)-16 ); WriteOut(Text); Str(StreamStart+Position,Text); Text:=' Error offset: '+Text+' ($'+IntToHe x(StreamStart+Position,8)+')'; WriteOut(Text); Seek(Output,LastIndexPosition); If CheckBox1.Checked Then Seek(Backup,LastBackupPosition); j:=Position; Repeat Seek(Input,StreamStart+Position); If Not Eof(Input) Then Begin BlockRead(Input,Buffer[1],32768,Temp); k:=1; Repeat If ((Chr(Buffer[k])='d') Or (Chr(Buffer[k])='w')) Then Begin If ((Chr(Buffer[k+1])='c') Or (Chr(Buffer[k+1])= 'b')) Then Begin Seek(Input,StreamStart+Position+k-3); If Not Eof(Input) Then BlockRead(Input,ChunkName[1],4); End; End; Inc(k); Text2:=Copy(ChunkName,3,2); Until (((Text2='dc') Or (Text2='db') Or (Te 20;t2='wb')) And ((ChunkName[1] In Number) And (ChunkName[2] In Number))) Or (Chunkname='idx1') Or (k>32768); Inc(Position,k-3); End; Application.ProcessMessages; If StopButton Then Begin WriteOut(' Index rebuilding aborted...'); ProgressBar1.Position:=0; StopButton:=False; CloseFile(Input); CloseFile(Output); If CheckBox1.Checked Then CloseFile(Backup); If CheckBox3.Checked Then CloseFile(Log); Erase(Output); EnableButtons; Exit; End; Text2:=Copy(ChunkName,3,2); Until (((Text2='dc') Or (Text2='db') Or (Te xt2='wb')) And ((ChunkName[1] In Number) And (ChunkName[2] In Number))) Or (Chunkname='idx1') Or Eof(Input); If Not Eof(Input) Then Dec(Position); If CheckBox1.Checked Then Begin If Not(CheckBox2.Checked) Then Begin Seek(Input,StreamStart+j); If Position-j>32768 Then Begin For k:=1 To (Position-j) Div 32768 Do Begin BlockRead(Input,Buffer,32768,Temp); BlockWrite(Backup,Buffer,Temp); End; BlockRead(Input,Buffer,((Position-j) Mod 32768),Temp); BlockWrite(Backup,Buffer,Temp); End Else Begin BlockRead(Input,Buffer,Position-j,Temp); BlockWrite(Backup,Buffer,Temp); End; End Else Difference:=Difference+LastInputPosition-FilePos(Input); End; End Else Begin Seek(Input,FilePos(Input)+6); ChunkName[0]:=#2; BlockRead(Input,ChunkName[1],2); Seek(Input,FilePos(Input)-8); If (ChunkName='dc') Or (ChunkName='wb') Or (ChunkNam e='db') Then Begin ChunkName[0]:=#4; ChunkName:='idx1'; End Else Begin ChunkName[0]:=#4; ChunkName:='0000'; Goto BError; End; End; End; End; End; Application.ProcessMessages; If StopButton Then Begin WriteOut(' Index rebuilding aborted...'); ProgressBar1.Position:=0; StopButton:=False; CloseFile(Input); CloseFile(Output); If CheckBox1.Checked Then CloseFile(Backup); If CheckBox3.Checked Then CloseFile(Log); Erase(Output); EnableButtons; Exit; End; Until (Eof(Input)) Or (ChunkName='idx1'); Size:=i*16; Seek(Output,4); BlockWrite(Output,Size,4); If CheckBox1.Checked Then Begin If ChunkName='idx1' Then StreamSize:=FilePos(Backup)-StreamS tart-4 Else StreamSize:=Filesize(Backup)-StreamStart; Seek(Backup,StreamStart-4); BlockWrite(Backup,StreamSize,4); Seek(Backup,StreamStart+StreamSize); Seek(Output,0); Repeat BlockRead(Output,Buffer,32768,Temp); BlockWrite(Backup,Buffer,Temp); Until Not(Temp=32768); WriteOut(' Done.'); If CheckBox3.Checked Then WriteOut(''); ProgressBar1.Position:=100; Truncate(Backup); CloseFile(Input); CloseFile(Output); CloseFile(Backup); If CheckBox3.Checked Then CloseFile(Log); Erase(Output); End Else Begin If ChunkName='idx1' Then StreamSize:=FilePos(Input)-StreamSt art-4 Else StreamSize:=Filesize(Input)-StreamStart; Seek(Input,StreamStart-4); BlockWrite(Input,StreamSize,4); Seek(Input,StreamStart+StreamSize); Seek(Output,0); Repeat BlockRead(Output,Buffer,32768,Temp); BlockWrite(Input,Buffer,Temp); Until Not(Temp=32768); Truncate(Input); WriteOut(' Done.'); If CheckBox3.Checked Then WriteOut(''); ProgressBar1.Position:=100; CloseFile(Input); CloseFile(Output); If CheckBox3.Checked Then CloseFile(Log); Erase(Output); End; EnableButtons; end; procedure TForm1.Button2Click(Sender: TObject); begin DisableButtons; If Maskedit1.Text='' Then Begin WriteOut(' No file selected.'); EnableButtons; Exit; End; AssignFile(Input,MaskEdit1.Text); {$I-} Reset(Input,1); {$I+} If IOResult<>0 Then Begin WriteOut(' Can not open the file.'); EnableButtons; Exit; End; Seek(Input,8); BlockRead(Input,ChunkName[1],8); ChunkName[0]:=#8; If ChunkName<>'AVI LIST' Then Begin WriteOut(' This is not an AVI file.'); CloseFile(Input); EnableButtons; Exit; End; WriteOut(' Stripping index...'); Position:=16; Size:=0; Chunkname[0]:=#4; Repeat Position:=Position+Size; Seek(Input,Position); BlockRead(Input,Size,4); BlockRead(Input,Chunkname[1],4); Inc(Position,8); Until Chunkname='movi'; StreamStart:=Position-4; StreamSize:=Size; Seek(Input,StreamStart+StreamSize); If Eof(Input) Then Begin WriteOut(' Unexpected end of file, index not found.'); CloseFile(Input); EnableButtons; Exit; End; Truncate(Input); Seek(Input,StreamStart-4); BlockWrite(Input,StreamSize,4); CloseFile(Input); WriteOut(' Done.'); EnableButtons; end; procedure TForm1.Button3Click(Sender: TObject); Label CError; Label CStartRead; begin DisableButtons; If MaskEdit1.Text='' Then Begin WriteOut(' No file selected.'); EnableButtons; Exit; End; AssignFile(Input,MaskEdit1.Text); AssignFile(Log,MaskEdit3.Text); {$I-} FileMode:=0; Reset(Input,1); FileMode:=2; {$I+} If IOResult<>0 Then Begin WriteOut(' Can not open the file.'); EnableButtons; Exit; End; If CheckBox3.Checked Then Begin {$I-} Reset(Log); {$I+} If IOResult<>0 Then Begin {$I-} Rewrite(Log); {$I+} If IOResult<>0 Then Begin WriteOut(' Cannot create log file.'); CloseFile(Input); EnableButtons; Exit; End Else Begin CloseFile(Log); Append(Log); End; End Else Begin CloseFile(Log); Append(Log); End; End; Seek(Input,8); BlockRead(Input,ChunkName[1],8); ChunkName[0]:=#8; If ChunkName<>'AVI LIST' Then Begin WriteOut(' This is not an AVI file.'); CloseFile(Input); If CheckBox3.Checked Then CloseFile(Log); EnableButtons; Exit; End; If CheckBox3.Checked Then Begin Logging:=True; WriteOut(' Error checking for file: '+MaskEdit1.Text); End Else WriteOut(' Checking Errors...'); WriteOut(' NOTE: The error checking is not perfect!'); Position:=16; Size:=0; Chunkname[0]:=#4; Repeat Position:=Position+Size; Seek(Input,Position); BlockRead(Input,Size,4); BlockRead(Input,Chunkname[1],4); Inc(Position,8); Until Chunkname='movi'; StreamStart:=Position-4; StreamSize:=Size; Chunkname:='idx1'; Position:=4; i:=0; Frame:=0; Interleaved:=False; StopButton:=False; Repeat ProgressBar1.Position:=Position Div (FileSize(Input) Div 100 ); Seek(Input,StreamStart+Position); If Not Eof(Input) Then Begin CStartRead: BlockRead(Input,Chunkname[1],4,Temp); If ChunkName='LIST' Then Begin Seek(Input,FilePos(Input)+8); Inc(Position,12); Goto CStartRead; End; If ChunkName='JUNK' Then Begin BlockRead(Input,Size,4); Position:=Position+Size+8; Seek(Input,StreamStart+Position); Goto CStartRead; End; Text2:=Copy(ChunkName,3,2); If (Copy(ChunkName,1,2)='ix') Or (Text2='ix ') Then Begin Seek(Input,FilePos(Input)+12); Inc(Position,16); Seek(Input,StreamStart+Position); Interleaved:=True; Goto CStartRead; End; If Not Eof(Input) Then Begin If ((ChunkName[1] In Number) And (ChunkName[2] In Number)) And ((Text2='dc') Or (Text2='db') Or (Text 2='wb')) Then Begin If (Text2='dc') Or (Text2='db') Then Inc(Fram e); If Interleaved Then Begin Seek(Input,FilePos(Input)-16); Dec(Position,16); Interleaved:=False; End; BlockRead(Input,Size,4,Temp); If (Size<0) And (Temp=4) Then Begin Inc(Position,4); Seek(Input,StreamStart+Position); BlockRead(Input,Chunkname[1],4); If ChunkName='LIST' Then Begin Seek(Input,FilePos(Input)+8); Inc(Position,12); Goto CStartRead; End; If ChunkName='JUNK' Then Begin BlockRead(Input,Size,4); Position:=Position+Size+8; Seek(Input,StreamStart+Position); Goto CStartRead; End; Seek(Input,StreamStart+Position); Goto CError; End; If Not Eof(Input) Then Begin BlockRead(Input,FrameType,1); j:=(((Position+Size) Div 2)+((Position+Size) Mod 2))*2+8; Seek(Input,StreamStart+j-1); If Not Eof(Input) Then Begin Position:=(((Position+Size) Div 2)+((Position+Size) Mod 2))*2+8; Inc(i); End; End; End Else CError: If Chunkname<>'idx1' Then Begin Str(Frame,Text); Text:=' Corrupted data detected at frame '+Text; WriteOut(Text); Str(StreamStart+Position,Text); Text:=' Error offset: '+Text+' ($'+IntToHe x(StreamStart+Position,8)+')'; WriteOut(Text); Repeat Seek(Input,StreamStart+Position); If Not Eof(Input) Then Begin BlockRead(Input,Buffer[1],32768,Temp); j:=1; Repeat If ((Chr(Buffer[j])='d') Or (Chr(Buffer[j])='w')) And (Not Eof(Input)) Then Begin If ((Chr(Buffer[j+1])='c') Or (Chr(Buffer[j+1])=& #39;b')) And (Not Eof(Input)) Then Begin Seek(Input,StreamStart+Position+j-3); If Not Eof(Input) Then BlockRead(Input,ChunkName[1],4); End; End; Inc(j); Text2:=Copy(ChunkName,3,2); Until (((Text2='dc') Or (Text2='db') Or (Text2='wb')) And ((ChunkName[1] In Number) And (ChunkName[2] In Number))) Or (Chunkname='idx1& #39;) Or (j>32768); End; Inc(Position,j-3); Application.ProcessMessages; If StopButton Then Begin WriteOut(' Error checking aborted...'); ProgressBar1.Position:=0; StopButton:=False; CloseFile(Input); If CheckBox3.Checked Then CloseFile(Log); EnableButtons; Exit; End; Text2:=Copy(ChunkName,3,2); Until (((Text2='dc') Or (Text2='db') Or (Text2='wb')) And ((ChunkName[1] In Number) A nd (ChunkName[2] In Number))) Or (Chunkname='idx1 9;) Or Eof(Input); If Not Eof(Input) Then Dec(Position); End Else Begin Seek(Input,FilePos(Input)+6); ChunkName[0]:=#2; BlockRead(Input,ChunkName[1],2); Seek(Input,FilePos(Input)-8); If (ChunkName='dc') Or (ChunkName='wb') Or (ChunkNam e='db') Then Begin ChunkName[0]:=#4; ChunkName:='idx1'; End Else Begin ChunkName[0]:=#4; ChunkName:='0000'; Goto CError; End End; End; End; Application.ProcessMessages; If StopButton Then Begin WriteOut(' Error checking aborted...'); ProgressBar1.Position:=0; StopButton:=False; CloseFile(Input); If CheckBox3.Checked Then CloseFile(Log); Exit; End; Until (Eof(Input)) Or (ChunkName='idx1'); WriteOut(' Done.'); If CheckBox3.Checked Then WriteOut(''); ProgressBar1.Position:=100; CloseFile(Input); If CheckBox3.Checked Then CloseFile(Log); EnableButtons; end; procedure TForm1.Exit1Click(Sender: TObject); begin Close; end; procedure TForm1.About1Click(Sender: TObject); begin Form2.Show; end; procedure TForm1.StayTop(Sender: TObject); begin If Stayontop1.Checked Then Begin Stayontop1.Checked:=Not(Stayontop1.Checked); SetWindowPos(TForm1(Self).Handle,HWND_NOTOPMOST,0,0,0,0, SWP_NOSIZE+SWP_NOMOVE); End Else Begin Stayontop1.Checked:=Not(Stayontop1.Checked); SetWindowPos(TForm1(Self).Handle,HWND_TOPMOST,0,0,0,0,SW P_NOSIZE+SWP_NOMOVE); End; end; procedure TForm1.FormCreate(Sender: TObject); begin DropFileTarget1.register(Form1) end; procedure TForm1.FormDestroy(Sender: TObject); begin DropFiletarget1.Unregister; end; procedure TForm1.DropFileTarget1Drop(Sender: TObject; ShiftState: TShiftState; Point: TPoint; var Effect: Integer); begin MaskEdit1.Text:=DropFileTarget1.files[0]; If MaskEdit1.Text<>'' Then MaskEdit2.Text:=E 0;tractFilePath(MaskEdit1.Text)+ 'DivFix.'+ExtractFileName(MaskEdit1.Text); end; procedure TForm1.StopClick(Sender: TObject); begin StopButton:=True; end; procedure TForm1.CheckBox1Click(Sender: TObject); begin CheckBox2.Enabled:=Not(CheckBox2.Enabled); SpeedButton2.Enabled:=Not(SpeedButton2.Enabled); Maskedit2.Enabled:=Not(MaskEdit2.Enabled); If Not(CheckBox2.Enabled) Then CheckBox2.Checked:=False; end; procedure TForm1.CheckBox3Click(Sender: TObject); begin SpeedButton3.Enabled:=Not(SpeedButton3.Enabled); Maskedit3.Enabled:=Not(MaskEdit3.Enabled); If Not(CheckBox2.Enabled) Then CheckBox2.Checked:=False; end; procedure TForm1.ShowWebPage(Sender: TObject); begin ShellExecute(0,'open',pchar('http://divfix.maxeline.com'),nil,nil,SW_MAXI MIZE); end; end. Source/Parameters.pas: unit Parameters; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ExtCtrls; type TForm3 = class(TForm) Label1: TLabel; Label2: TLabel; Label3: TLabel; Label4: TLabel; Bevel1: TBevel; Label5: TLabel; Button1: TButton; Label6: TLabel; Label7: TLabel; Label8: TLabel; Label9: TLabel; Label10: TLabel; Label11: TLabel; procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form3: TForm3; implementation {$R *.DFM} procedure TForm3.Button1Click(Sender: TObject); begin Form3.Button1.Cancel:=False; Form3.Close; end; end.
People who download `DivFix v1.08' also download this cracks/keygens/serials:
Previous cracks
Next cracks
Alternative spelling
Looking for real sex? Find someone now on the largest sex personals network. FREE signup! Post a FREE erotic ad w/5 photos, flirt in chatrooms, view explicit live Webcams, meet for REAL sex! 30,000 new photos every day! Find SEX now!
Ads
Contacts: submit <submit@the.domain>; info <info@the.domain>
Links: Astalavista.box.sk Serials and Keys Lomalka crack portal Crack CD
Get Firefox!