Credit Andrew - fix vorbis audio which was scratchy and ensure aging plugin does...
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / indexfile.C
index 977ad1cbfd5c99cb7239dca14479baed5570d691..16175535e96a0f1e876a893ca07d2b66c5a347c5 100644 (file)
@@ -2,6 +2,7 @@
 /*
  * CINELERRA
  * Copyright (C) 1997-2014 Adam Williams <broadcast at earthling dot net>
+ * Copyright (C) 2003-2016 Cinelerra CV contributors
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -73,6 +74,9 @@
 #ifdef HAVE_ISOFS
 #include <linux/iso_fs.h>
 #endif
+#if defined(__FreeBSD__)
+#include <isofs/cd9660/iso.h>
+#endif
 
 // check for isofs volume_id for dvd/cdrom
 
@@ -859,7 +863,8 @@ int IndexFile::read_info(Indexable *test_indexable)
 
                data = new char[index_state->index_start];
                temp = fread(data, index_state->index_start - sizeof(int64_t), 1, fd);
-               if(!temp) return 1;
+               if(!temp) { delete [] data;
+               return 1;}
 
                data[index_state->index_start - sizeof(int64_t)] = 0;
                FileXML xml;