Skip to content

Commit

Permalink
Bug fix: adaptive audio buffer for reading short files
Browse files Browse the repository at this point in the history
  • Loading branch information
Zulko committed May 20, 2014
1 parent 3b797c6 commit b64cf4c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion moviepy/audio/io/readers.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ def __init__(self, filename, buffersize, print_infos=False,
self.infos = infos
self.proc = None

self.buffersize=buffersize
self.nframes = int(self.fps * self.duration)
self.buffersize= min( self.nframes, buffersize )
self.buffer= None
self.buffer_startframe = 1
self.initialize()
Expand Down

0 comments on commit b64cf4c

Please sign in to comment.