From: <man...@us...> - 2007-06-27 19:04:27
|
Revision: 6673 http://svn.sourceforge.net/openmsx/?rev=6673&view=rev Author: manuelbi Date: 2007-06-27 12:04:27 -0700 (Wed, 27 Jun 2007) Log Message: ----------- Fixed LIST size bug for INFO list Modified Paths: -------------- openmsx/trunk/src/video/AviWriter.cc Modified: openmsx/trunk/src/video/AviWriter.cc =================================================================== --- openmsx/trunk/src/video/AviWriter.cc 2007-06-27 14:31:15 UTC (rev 6672) +++ openmsx/trunk/src/video/AviWriter.cc 2007-06-27 19:04:27 UTC (rev 6673) @@ -167,8 +167,10 @@ snprintf(dateStr, 11, "%04d-%02d-%02d", 1900 + tm->tm_year, tm->tm_mon + 1, tm->tm_mday); AVIOUT4("LIST"); - AVIOUTd(4 + (4 + strlen(versionStr) + 1) + - (4 + strlen(dateStr ) + 1)); // Size of the list + AVIOUTd(4 /*list type*/ + + (4 + 4 + ((strlen(versionStr) + 1) + 1) & ~1) // 1st chunk + + (4 + 4 + ((strlen(dateStr ) + 1) + 1) & ~1) // 2nd chunk + ); // Size of the list AVIOUT4("INFO"); AVIOUT4("ISFT"); AVIOUTd(strlen(versionStr) + 1); // # of bytes to follow @@ -177,6 +179,8 @@ AVIOUTd(strlen(dateStr) + 1); // # of bytes to follow AVIOUTs(dateStr); // TODO: add artist (IART), comments (ICMT), name (INAM), etc. + // use a loop over chunks (type + string) to create the above bytes in + // a much nicer way // Finish stream list, i.e. put number of bytes in the list to proper pos int nmain = header_pos - main_list - 4; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |