]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Ignore empty markers.
authorSjoerd Mullender <sjoerd@acm.org>
Mon, 3 Oct 1994 10:21:06 +0000 (10:21 +0000)
committerSjoerd Mullender <sjoerd@acm.org>
Mon, 3 Oct 1994 10:21:06 +0000 (10:21 +0000)
Lib/aifc.py

index 22bff01916d4ee5a1d6f9c337a9e65d2d4656761..d13a3b17be534a48c9dd84d39bea368b4205b90a 100644 (file)
@@ -593,7 +593,11 @@ class Aifc_read:
                                id = _read_short(chunk)
                                pos = _read_long(chunk)
                                name = _read_string(chunk)
-                               self._markers.append((id, pos, name))
+                               if pos or name:
+                                       # some files appear to have
+                                       # dummy markers consisting of
+                                       # a position 0 and name ''
+                                       self._markers.append((id, pos, name))
                except EOFError:
                        print 'Warning: MARK chunk contains only',
                        print len(self._markers),