Skip to content

Commit a170bf2

Browse files
committed
Fix #553
1 parent 860490e commit a170bf2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

auto_editor/render/audio.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,11 @@ def process_audio_clip(
225225
output_file.close()
226226

227227
output_bytes.seek(0)
228+
has_filesig = output_bytes.read(4)
229+
output_bytes.seek(0)
230+
if not has_filesig: # Can rarely happen when clip is extremely small
231+
return np.empty((0, 2), dtype=np.int16)
232+
228233
return read(output_bytes)[1]
229234

230235

0 commit comments

Comments
 (0)