[libbluray-devel] disc: no need to store device

hpi1 git at videolan.org
Fri Mar 20 13:43:39 CET 2015


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Fri Mar 20 13:19:15 2015 +0200| [a73e1522ed448c8a5b3e3392ce44e9e189b63321] | committer: hpi1

disc: no need to store device

> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=a73e1522ed448c8a5b3e3392ce44e9e189b63321
---

 src/libbluray/disc/disc.c |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/src/libbluray/disc/disc.c b/src/libbluray/disc/disc.c
index 7ac7e40..d3a280a 100644
--- a/src/libbluray/disc/disc.c
+++ b/src/libbluray/disc/disc.c
@@ -42,7 +42,6 @@ struct bd_disc {
     BD_MUTEX  ovl_mutex;     /* protect access to overlay root */
 
     char     *disc_root;     /* disc filesystem root (if disc is mounted) */
-    char     *disc_device;   /* disc device (if using real device) */
     char     *overlay_root;  /* overlay filesystem root (if set) */
 
     BD_DEC   *dec;
@@ -213,8 +212,6 @@ BD_DISC *disc_open(const char *device_path,
 
         char *disc_root = mount_get_mountpoint(device_path);
 
-        p->disc_device = str_dup(device_path);
-
         /* make sure path ends to slash */
         if (disc_root[0] && disc_root[strlen(disc_root) - 1] == DIR_SEP_CHAR) {
             p->disc_root = disc_root;
@@ -254,7 +251,7 @@ BD_DISC *disc_open(const char *device_path,
         }
 #endif
 
-        struct dec_dev dev = { p->fs_handle, p->pf_file_open_bdrom, p, (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, device_path };
         p->dec = dec_init(&dev, enc_info, keyfile_path, regs, psr_read, psr_write);
     }
 
@@ -275,7 +272,6 @@ void disc_close(BD_DISC **pp)
         bd_mutex_destroy(&p->ovl_mutex);
 
         X_FREE(p->disc_root);
-        X_FREE(p->disc_device);
         X_FREE(*pp);
     }
 }



More information about the libbluray-devel mailing list