diff --git a/danmaku2ass.py b/danmaku2ass.py index 6e5a249..6ae8ded 100755 --- a/danmaku2ass.py +++ b/danmaku2ass.py @@ -697,7 +697,7 @@ def Danmaku2ASS(input_files, output_file, stage_width, stage_height, reserve_bla fo = sys.stdout ProcessComments(comments, fo, stage_width, stage_height, reserve_blank, font_face, font_size, text_opacity, comment_duration, is_reduce_comments, progress_callback) finally: - if output_file and fo: + if output_file and fo != output_file: fo.close()