Skip to content

Commit

Permalink
Fix error
Browse files Browse the repository at this point in the history
  • Loading branch information
mondeja committed Jan 23, 2021
1 parent 805ddbc commit e9fac98
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion moviepy/audio/io/readers.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ def __init__(
self.codec = "pcm_s%dle" % (8 * nbytes)
self.nchannels = nchannels
infos = ffmpeg_parse_infos(filename, decode_file=decode_file)
self.duration = infos.get("video_duration", infos["duration"])
self.duration = infos.get("video_duration")
if self.duration is None:
self.duration = infos["duration"]
self.bitrate = infos["audio_bitrate"]
self.infos = infos
self.proc = None
Expand Down

0 comments on commit e9fac98

Please sign in to comment.