[libbluray-devel] Fix checking if file exists in udf image
hpi1
git at videolan.org
Tue Feb 10 12:15:31 CET 2015
libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Tue Feb 10 12:59:28 2015 +0200| [3b9d1c722ec9c923652e55efc0216d52a656adc9] | committer: hpi1
Fix checking if file exists in udf image
> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=3b9d1c722ec9c923652e55efc0216d52a656adc9
---
src/libbluray/disc/dec.c | 6 +++---
src/libbluray/disc/dec.h | 3 ++-
src/libbluray/disc/disc.c | 4 ++--
3 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/src/libbluray/disc/dec.c b/src/libbluray/disc/dec.c
index 75878ba..65f6d36 100644
--- a/src/libbluray/disc/dec.c
+++ b/src/libbluray/disc/dec.c
@@ -158,7 +158,7 @@ static int _bdrom_have_file(void *p, const char *dir, const char *file)
char *path;
path = str_printf("%s" DIR_SEP "%s", dir, file);
- fp = dev->pf_file_open_bdrom(dev->file_open_handle, path);
+ fp = dev->pf_file_open_bdrom(dev->file_open_bdrom_handle, path);
X_FREE(path);
if (fp) {
@@ -190,7 +190,7 @@ static int _libaacs_init(BD_DEC *dec, struct dec_dev *dev,
return 0;
}
- result = libaacs_open(dec->aacs, dev->device, dev->file_open_handle, dev->pf_file_open_vfs, keyfile_path);
+ result = libaacs_open(dec->aacs, dev->device, dev->file_open_vfs_handle, dev->pf_file_open_vfs, keyfile_path);
i->aacs_error_code = result;
i->aacs_handled = !result;
@@ -235,7 +235,7 @@ static int _libbdplus_init(BD_DEC *dec, struct dec_dev *dev,
return 0;
}
- if (libbdplus_init(dec->bdplus, dev->root, dev->file_open_handle, dev->pf_file_open_bdrom, vid, mk)) {
+ if (libbdplus_init(dec->bdplus, dev->root, dev->file_open_bdrom_handle, dev->pf_file_open_bdrom, vid, mk)) {
BD_DEBUG(DBG_BLURAY | DBG_CRIT, "bdplus_init() failed\n");
i->bdplus_handled = 0;
diff --git a/src/libbluray/disc/dec.h b/src/libbluray/disc/dec.h
index 961c9c9..cdf9b77 100644
--- a/src/libbluray/disc/dec.h
+++ b/src/libbluray/disc/dec.h
@@ -35,8 +35,9 @@ typedef struct bd_file_s * (*file_openFp)(void *, const char *);
/* device to use */
struct dec_dev {
- void *file_open_handle;
+ void *file_open_bdrom_handle;
file_openFp pf_file_open_bdrom;
+ void *file_open_vfs_handle;
file_openFp pf_file_open_vfs;
const char *root; /* may be NULL if disc is not mounted */
const char *device; /* may be null if not reading from real device */
diff --git a/src/libbluray/disc/disc.c b/src/libbluray/disc/disc.c
index 1853e23..d4cfed9 100644
--- a/src/libbluray/disc/disc.c
+++ b/src/libbluray/disc/disc.c
@@ -246,11 +246,11 @@ BD_DISC *disc_open(const char *device_path,
}
} else {
dir_close(dp_img);
- BD_DEBUG(DBG_FILE | DBG_CRIT, "%s does not seem to be image file or device node\n", device_path);
+ BD_DEBUG(DBG_FILE, "%s does not seem to be image file or device node\n", device_path);
}
#endif
- struct dec_dev dev = { p, p->pf_file_open_bdrom, (file_openFp)disc_open_path, p->disc_root, p->disc_device };
+ struct dec_dev dev = { p->fs_handle, p->pf_file_open_bdrom, p, (file_openFp)disc_open_path, p->disc_root, p->disc_device };
p->dec = dec_init(&dev, enc_info, keyfile_path, regs, psr_read, psr_write);
}
More information about the libbluray-devel
mailing list