[DVDnav-discuss] r1032 - trunk/libdvdnav/src/dvdread/dvd_udf.c

nicodvb subversion at mplayerhq.hu
Sat May 10 12:07:06 CEST 2008


Author: nicodvb
Date: Sat May 10 12:07:06 2008
New Revision: 1032

Log:
use memcpy() instead of struct assignment. Patch by Erik Hovland org
It may not be nice (IIRC strcuct assignment should be totally equivalent)
but allegedly some compilers don't work as expected.


Modified:
   trunk/libdvdnav/src/dvdread/dvd_udf.c

Modified: trunk/libdvdnav/src/dvdread/dvd_udf.c
==============================================================================
--- trunk/libdvdnav/src/dvdread/dvd_udf.c	(original)
+++ trunk/libdvdnav/src/dvdread/dvd_udf.c	Sat May 10 12:07:06 2008
@@ -501,7 +501,7 @@ static int UDFMapICB( dvd_reader_t *devi
     tmpmap.lbn = lbnum;
     if(GetUDFCache(device, MapCache, lbnum, &tmpmap)) {
       *FileType = tmpmap.filetype;
-      *File = tmpmap.file;
+      memcpy(File, &tmpmap.file, sizeof(tmpmap.file));
       return 1;
     }
 
@@ -514,7 +514,7 @@ static int UDFMapICB( dvd_reader_t *devi
 
         if( TagID == 261 ) {
             UDFFileEntry( LogBlock, FileType, partition, File );
-           tmpmap.file = *File;
+           memcpy(&tmpmap.file, File, sizeof(tmpmap.file));
            tmpmap.filetype = *FileType;
            SetUDFCache(device, MapCache, tmpmap.lbn, &tmpmap);
             return 1;



More information about the DVDnav-discuss mailing list