Commit cc7b8bd4 authored by moto's avatar moto Committed by Facebook GitHub Bot
Browse files

Allow overwrite temp data in ffmpeg test (#3263)

Summary:
When `TORCHAUDIO_TEST_TEMP_DIR` is set,
all the unit test temporary data are stored in the  given directory.
Running unit tests multiple times reuses the
directory and the temporary files from the
previous test runs are found there.

FFmpeg save test writes reference data to the
temporary directory, but it is not given the
overwrite flag ("-y"), so it fails in such cases.

This commit fixes that.

Pull Request resolved: https://github.com/pytorch/audio/pull/3263

Reviewed By: hwangjeff

Differential Revision: D44859003

Pulled By: mthrok

fbshipit-source-id: 2db92fbdec1c015455f3779e10a18f7f1146166b
parent 563e409c
......@@ -25,7 +25,7 @@ from torchaudio_unittest.common_utils import (
def _convert_audio_file(src_path, dst_path, format=None, acodec=None):
command = ["ffmpeg", "-i", src_path, "-strict", "-2"]
command = ["ffmpeg", "-y", "-i", src_path, "-strict", "-2"]
if format:
command += ["-sample_fmt", format]
if acodec:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment