Introduction: When I add a file via Starburn_UDF2_FileUnicodeCreate w/o calling StarBurn_UDF2_FileDirectoryDateTimeSet after (on the just added file), I get a failure on accessing the file later.
Suspicion (based on empirical testing): The Starburn_UDF2_FileUnicodeCreate by itself fails to initialize a file object completely, but calling the StarBurn_UDF2_FileDirectoryDateTimeSet seems to fix the problem.
Details: I used the UDF2BuildBurn.c (ie StarBurn_UDF2_DirectoryUnicodeProcessEx) example to burn a directory with 1 mpeg-2 file in it. On reviewing of the just burned disc, everything always works. I created a clone of the UDF2BuildBurn.c to UDF2FiletreeBurn.c, and I replaced the StarBurn_UDF2_DirectoryUnicodeProcessEx call with a StarBurn_UDF2_DirectoryUnicodeCreate & StarBurn_UDF2_FileUnicodeCreate. So the UDF2FiletreeBurn.c basically creates the same directory as before, but only adds 1 file to the just created directory. I used the same data for both tests, and both udf discs look identical. However, when I try to access the video file from the UDF2FiletreeBurn burn, I get a failure. When I access the same video file from the UDF2BuildBurn burn, everything works. I looked at the debug output from the UDF2BuildBurn (ie StarBurn_UDF2_DirectoryUnicodeProcessEx) and noticed that a StarBurn_UDF2_FileDirectoryDateTimeSet call is being made for every directory/file being added. So I modified the UDF2FiletreeBurn to also do a StarBurn_UDF2_FileDirectoryDateTimeSet for both the StarBurn_UDF2_DirectoryUnicodeCreate & StarBurn_UDF2_FileUnicodeCreate, and now the resulting burn always works. I am going to modify my code to use the StarBurn_UDF2_FileDirectoryDateTimeSet which fixes my problems, however I figured you might want to know about this oddity.
|