aboutsummaryrefslogtreecommitdiffstats
path: root/multimedia/lxdvdrip/files/patch-lxdvdrip.c
blob: 07b0fd577529d7680656d6ccf338deec74b162ad (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
--- lxdvdrip.c.orig Tue May 31 23:26:37 2005
+++ lxdvdrip.c  Wed Jul  6 18:34:10 2005
@@ -763,6 +763,9 @@
   FILE *filehandle = 0;
   int i;
 
+#define    DVD_SEC_SIZ 2048
+  char tempBuf[DVD_SEC_SIZ];
+
   if (!(filehandle = fopen (dvd_device, "r")))
     {
       switch (lSprache)
@@ -782,7 +785,7 @@
       return -1;
     }
 
-  if (fseek (filehandle, 32808, SEEK_SET))
+  if (fseek (filehandle, 32768, SEEK_SET))
     {
       fclose (filehandle);
       switch (lSprache)
@@ -802,7 +805,7 @@
       return -1;
     }
 
-  if (32 != (i = fread (title, 1, 32, filehandle)))
+  if (DVD_SEC_SIZ != fread (tempBuf, 1, DVD_SEC_SIZ, filehandle))
     {
       fclose (filehandle);
       switch (lSprache)
@@ -820,7 +823,8 @@
       strcpy (title, "unknown");
       return -1;
     }
-
+  snprintf( title, 32, "%s", tempBuf + 40 );
+  i=32;
   fclose (filehandle);
 
   title[32] = '\0';
@@ -7633,7 +7637,7 @@
        strcat (szFilmVerzeichnis, "/");
      strcat (szFilmVerzeichnis, szDVDName);
      // Verzeichnis AUDIO_TS anlegen
-     sprintf (szBefehl, "mkdir %s/AUDIO_TS -m 0777", szFilmVerzeichnis);
+     sprintf (szBefehl, "mkdir -m 0777 %s/AUDIO_TS", szFilmVerzeichnis);
      printf ("%s\n", szBefehl);
      system (szBefehl);
    }