1. fix accessing uninitialized values in XvImage 
2. fix strdup/delete mismatch -> strdup/free
3. fix a bug in eprintf patch which was incorrectly reporting erros in filemov.C

bye
andraz
diff -ru --exclude-from exclude hvirtual-svn/guicast/bcbitmap.C hvirtual-2.1/guicast/bcbitmap.C
--- hvirtual-svn/guicast/bcbitmap.C	2006-10-12 12:08:15.000000000 +0200
+++ hvirtual-2.1/guicast/bcbitmap.C	2006-10-14 01:37:09.000000000 +0200
@@ -680,7 +680,7 @@
 
 long BC_Bitmap::get_u_offset()
 {
-	if(xv_image[0])
+	if(xv_image[0] && xv_image[current_ringbuffer]->num_planes > 1)
 		return xv_image[current_ringbuffer]->offsets[2];
 	else
 		return 0;
@@ -688,7 +688,7 @@
 
 long BC_Bitmap::get_v_offset()
 {
-	if(xv_image[0])
+	if(xv_image[0] && xv_image[current_ringbuffer]->num_planes > 1)
 		return xv_image[current_ringbuffer]->offsets[1];
 	else
 		return 0;
diff -ru --exclude-from exclude hvirtual-svn/cinelerra/cachebase.C hvirtual-2.1/cinelerra/cachebase.C
--- hvirtual-svn/cinelerra/cachebase.C	2006-10-12 12:09:09.000000000 +0200
+++ hvirtual-2.1/cinelerra/cachebase.C	2006-10-14 01:02:42.000000000 +0200
@@ -19,7 +19,7 @@
 
 CacheItemBase::~CacheItemBase()
 {
-	delete [] path;
+	free(path); // path was allocated with strdup in FramceCache::put_frame()
 }
 
 
Index: filemov.C
===================================================================
--- filemov.C	(revision 919)
+++ filemov.C	(working copy)
@@ -992,7 +992,7 @@
 				file->current_frame, 
 				file->current_layer) == file->current_frame));
 //printf("FileMOV::read_frame 1 %lld %d\n", file->current_frame, frame->get_keyframe());
-			result = quicktime_read_frame(fd, 
+			result = !quicktime_read_frame(fd, 
 				frame->get_data(), 
 				file->current_layer);
 			break;

Reply via email to