normalize newlines in encoding errors

This commit is contained in:
j 2014-01-24 11:46:06 +00:00
parent d0c9848e89
commit b7c4d9af41

View file

@ -254,6 +254,7 @@ def stream(video, target, profile, info, avconv=None):
t = "%s.mp4" % target if format == 'mp4' else target t = "%s.mp4" % target if format == 'mp4' else target
if os.path.exists(t): if os.path.exists(t):
os.unlink(t) os.unlink(t)
stdout = stdout.replace('\r\n', '\n').replace('\r', '\n')
return False, stdout return False, stdout
if format == 'mp4': if format == 'mp4':
cmd = ['qt-faststart', "%s.mp4" % target, target] cmd = ['qt-faststart', "%s.mp4" % target, target]