ports/67796: Update port: multimedia/mmpython from 0.4.2 to 0.4.3

Lewis Thompson lewiz at fajita.org
Thu Jun 10 18:34:29 UTC 2004


Please also include the following patch.  This fixes mmpython so that it
properly detects DVDs, VCDs etc.  This simply changes the seek
boundaries and will be sumitted to Freevo developers shortly.  Patch is
as follows: patch-freebsd-dvd:

diff -ruN disc/discinfo.py disc/discinfo.py
--- disc/discinfo.py	Thu Jun 10 19:22:00 2004
+++ disc/discinfo.py	Thu Jun 10 19:22:59 2004
@@ -223,22 +223,10 @@
     else:
         f = open(device,'rb')
 
-        f.seek(0x0000832d)
-        if os.uname()[0] == 'FreeBSD':
-            # why doesn't seeking to 0x0000832d+40 and reading 32 work?
-            # no idea, do it this way
-            label = f.read(72);
-            label = label[40:72]
-        else:    
-            id = f.read(16)
-        f.seek(32808, 0)
-        if os.uname()[0] == 'FreeBSD':
-            # why doesn't seeking to 32808 + 829 and reading 16 work?
-            # no idea, do it this way
-            id = f.read(829);
-            id = id[813:829]
-        else:
-            label = f.read(32)
+        f.seek(32768)
+        id = f.read(829)
+        label = id[40:72]
+        id = id[813:829]
 
         if CREATE_MD5_ID:
             id_md5 = md5.new()
diff -ruN disc/dvdinfo.py disc/dvdinfo.py
--- disc/dvdinfo.py	Thu Jun 10 19:22:00 2004
+++ disc/dvdinfo.py	Thu Jun 10 19:23:49 2004
@@ -115,8 +115,8 @@
 
         # brute force reading of the device to find out if it is a DVD
         f = open(device,'rb')
-        f.seek(32808, 0)
-        buffer = f.read(50000)
+        f.seek(32768, 0)
+        buffer = f.read(50040)
 
         if buffer.find('UDF') == -1:
             f.close()
@@ -148,8 +148,8 @@
 
     def isDVDiso(self, f):
         # brute force reading of the device to find out if it is a DVD
-        f.seek(32808, 0)
-        buffer = f.read(50000)
+        f.seek(32768, 0)
+        buffer = f.read(50040)
 
         if buffer.find('UDF') == -1:
             return 0
diff -ruN disc/lsdvd.py disc/lsdvd.py
--- disc/lsdvd.py	Thu Jun 10 19:22:00 2004
+++ disc/lsdvd.py	Thu Jun 10 19:24:01 2004
@@ -173,8 +173,8 @@
 
         # brute force reading of the device to find out if it is a DVD
         f = open(device,'rb')
-        f.seek(32808, 0)
-        buffer = f.read(50000)
+        f.seek(32768, 0)
+        buffer = f.read(50040)
 
         if buffer.find('UDF') == -1:
             f.close()
diff -ruN disc/vcdinfo.py disc/vcdinfo.py
--- disc/vcdinfo.py	Thu Jun 10 19:22:00 2004
+++ disc/vcdinfo.py	Thu Jun 10 19:24:13 2004
@@ -62,8 +62,8 @@
         
         # brute force reading of the device to find out if it is a VCD
         f = open(device,'rb')
-        f.seek(32808, 0)
-        buffer = f.read(50000)
+        f.seek(32768, 0)
+        buffer = f.read(50040)
         f.close()
 
         if buffer.find('SVCD') > 0 and buffer.find('TRACKS.SVD') > 0 and \
diff -ruN video/vcdinfo.py video/vcdinfo.py
--- video/vcdinfo.py	Thu Jun 10 19:22:00 2004
+++ video/vcdinfo.py	Thu Jun 10 19:24:29 2004
@@ -85,8 +85,8 @@
         
         # brute force reading of the bin to find out if it is a VCD
         f = open(bin,'rb')
-        f.seek(32808, 0)
-        buffer = f.read(50000)
+        f.seek(32768, 0)
+        buffer = f.read(50040)
         f.close()
 
         if buffer.find('SVCD') > 0 and buffer.find('TRACKS.SVD') > 0 and \

-lewiz.

-- 
I was so much older then, I'm younger than that now.  --Bob Dylan, 1964.
------------------------------------------------------------------------
-| msn:purple at lewiz.net | jabber:lewiz at jabber.org | url:www.lewiz.org |-
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-ports-bugs/attachments/20040610/aad82587/attachment.sig>


More information about the freebsd-ports-bugs mailing list