From 2ad54f7618b73d68eb46de049628d1f0cd72bdc9 Mon Sep 17 00:00:00 2001 From: ping Date: Sat, 27 May 2017 23:40:42 +0800 Subject: [PATCH] Fix logic bug in stitch --- instagram_private_api_extensions/live.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instagram_private_api_extensions/live.py b/instagram_private_api_extensions/live.py index 969a20c..367440e 100644 --- a/instagram_private_api_extensions/live.py +++ b/instagram_private_api_extensions/live.py @@ -386,12 +386,12 @@ def stitch(self, output_filename, # resolution changed detected # push current generated file pair into sources sources.append({'video': video_stream, 'audio': audio_stream}) - prev_res = self.segment_meta[segment] video_stream = os.path.join( self.output_dir, video_stream_format.format(self.stream_id, len(sources))) audio_stream = os.path.join( self.output_dir, audio_stream_format.format(self.stream_id, len(sources))) + prev_res = self.segment_meta[segment] file_mode = 'ab' if os.path.exists(video_stream) else 'wb' seg_file = os.path.join(self.output_dir, segment)