dvdplayer: fixed bluray playback from directly from passed iso/img file
authorJoakim Plate <elupus@ecce.se>
Fri, 14 Dec 2012 20:01:02 +0000 (21:01 +0100)
committerJoakim Plate <elupus@ecce.se>
Fri, 14 Dec 2012 20:01:02 +0000 (21:01 +0100)
This was broken since 25eea81654add5a5d3394ae46b1ecd0edb1313b4

2nd try: old code invalidly split of iso filename before attempting to
parse udf folder

xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamBluray.cpp

index 71004d6..b4a17ba 100644 (file)
@@ -246,6 +246,7 @@ bool CDVDInputStreamBluray::Open(const char* strFile, const std::string& content
   CStdString strPath(strFile);
   CStdString filename;
   CStdString root;
+  CStdString ext(URIUtils::GetExtension(strPath));
 
   if(strPath.Left(7).Equals("bluray:"))
   {
@@ -253,6 +254,14 @@ bool CDVDInputStreamBluray::Open(const char* strFile, const std::string& content
     root     = url.GetHostName();
     filename = URIUtils::GetFileName(url.GetFileName());
   }
+  else if(ext == ".iso"
+       || ext == ".img")
+  {
+    CURL url("udf://");
+    url.SetHostName(strPath);
+    root     = url.Get();
+    filename = "index.bdmv";
+  }
   else
   {
     URIUtils::GetDirectory(strPath,strPath);
@@ -273,17 +282,6 @@ bool CDVDInputStreamBluray::Open(const char* strFile, const std::string& content
     filename = URIUtils::GetFileName(strFile);
   }
 
-
-  /* translate to udf file system if needed */
-  CStdString ext(URIUtils::GetExtension(root));
-  if(ext == ".iso"
-  || ext == ".img")
-  {
-    CURL url("udf://");
-    url.SetHostName(root);
-    root = url.Get();
-  }
-
   if (!m_dll)
     return false;