brasero r1825 - in trunk: . src/plugins/checksum



Author: philippr
Date: Sat Jan 24 13:31:04 2009
New Revision: 1825
URL: http://svn.gnome.org/viewvc/brasero?rev=1825&view=rev

Log:
2009-01-24  Philippe Rouquier  <ykw localhost localdomain>

	Fix a bug with previous patch which led to see as corrupted files that
	were a multiple of 2048.

	* src/plugins/checksum/burn-volume-read.c
	(brasero_volume_file_fill_buffer),
	(brasero_volume_file_read_direct):

Modified:
   trunk/ChangeLog
   trunk/src/plugins/checksum/burn-volume-read.c

Modified: trunk/src/plugins/checksum/burn-volume-read.c
==============================================================================
--- trunk/src/plugins/checksum/burn-volume-read.c	(original)
+++ trunk/src/plugins/checksum/burn-volume-read.c	Sat Jan 24 13:31:04 2009
@@ -78,7 +78,10 @@
 	handle->position += blocks;
 
 	if (handle->position == handle->extent_last)
-		handle->buffer_max = (blocks - 1) * 2048 + handle->extent_size % 2048;
+		handle->buffer_max = (blocks - 1) * 2048 +
+				     ((handle->extent_size % 2048) ?
+				      (handle->extent_size % 2048) :
+				       2048);
 	else
 		handle->buffer_max = sizeof (handle->buffer);
 
@@ -378,7 +381,9 @@
 		if (!handle->extents_forward) {
 			/* we reached the end of our file */
 			return (readblocks - 1) * 2048 +
-				handle->extent_size % 2048;
+			       ((handle->extent_size % 2048) != 0?
+			        (handle->extent_size % 2048) :
+				 2048);
 		}
 
 		if (!brasero_volume_file_next_extent (handle))



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]