diff options
authorAdrian C. (anrxc) <>2013-01-06 03:04:01 (GMT)
committerAdrian C. (anrxc) <>2013-01-06 03:04:01 (GMT)
commit051f76ff25d268a38b1bc34566b25a6b8f08b46a (patch)
parent2d70ee6b8cfced5ab1e6bcecf0e4a9ad14c7977c (diff)
play: handle ERR in addstr() crash with a temporary fixHEADmaster
Hit this bug with latest mplayer while playing flac v1.2.1 encoded audio files: Traceback (most recent call last): self.w.addstr(s[:-1]) error: addstr() returned ERR For these files somehow wild duration is established, at the same time ogg123 reads them correctly. Use a lazy try-except clause to work around the crash until I have time to research it.
1 files changed, 5 insertions, 2 deletions
diff --git a/ b/
index c9e0929..e210de4 100755
--- a/
+++ b/
@@ -118,8 +118,11 @@ class Window:
def insstr(self, s):
if not s: return
- self.w.addstr(s[:-1])
- self.w.hline(ord(s[-1]), 1) # insch() work-around
+ try:
+ self.w.addstr(s[:-1])
+ self.w.hline(ord(s[-1]), 1) # insch() work-around
+ except:
+ pass
def __getattr__(self, name):
return getattr(self.w, name)