Bug fix - worker was only taking one item and terminating after
This commit is contained in:
21
generator
21
generator
@@ -93,18 +93,19 @@ def generate_video_thumbnails(args):
|
||||
|
||||
|
||||
def worker(queue):
|
||||
work_unit = queue.get()
|
||||
while True:
|
||||
work_unit = queue.get()
|
||||
|
||||
# If no work unit then quit
|
||||
if not work_unit:
|
||||
return
|
||||
# If no work unit then quit
|
||||
if not work_unit:
|
||||
return
|
||||
|
||||
input_file, output_file, interval, size, columns = work_unit
|
||||
video_file_clip = VideoFileClip(input_file)
|
||||
output_prefix = get_output_prefix()
|
||||
file_name = os.path.basename(input_file)
|
||||
generate_frames(file_name, video_file_clip, interval, output_prefix, size)
|
||||
generate_sprite_from_frames(output_prefix, columns, size, output_file)
|
||||
input_file, output_file, interval, size, columns = work_unit
|
||||
video_file_clip = VideoFileClip(input_file)
|
||||
output_prefix = get_output_prefix()
|
||||
file_name = os.path.basename(input_file)
|
||||
generate_frames(file_name, video_file_clip, interval, output_prefix, size)
|
||||
generate_sprite_from_frames(output_prefix, columns, size, output_file)
|
||||
|
||||
|
||||
def generate_frames(file_name, video_file_clip, interval, output_prefix, size):
|
||||
|
||||
Reference in New Issue
Block a user