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

Fix signature mismatch on _fail_info_fileobj (#3032)

Summary:
If FFmpeg is not available, sox_io cannot fallback to it. In such case, we use a fallback function, just to raise an error with easy-to-understand message.

Turned out that the number of arguments this function receives is wrong.

This commit fixes it.

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

Reviewed By: hwangjeff

Differential Revision: D42966930

Pulled By: mthrok

fbshipit-source-id: c2c969c7f8db4119ae965a715d65c10f6ac6087c
parent c63e9eb8
...@@ -14,7 +14,7 @@ def _fail_info(filepath: str, format: Optional[str]) -> AudioMetaData: ...@@ -14,7 +14,7 @@ def _fail_info(filepath: str, format: Optional[str]) -> AudioMetaData:
raise RuntimeError("Failed to fetch metadata from {}".format(filepath)) raise RuntimeError("Failed to fetch metadata from {}".format(filepath))
def _fail_info_fileobj(fileobj, format: Optional[str]) -> AudioMetaData: def _fail_info_fileobj(fileobj, format: Optional[str], buffer_size: int) -> AudioMetaData:
raise RuntimeError("Failed to fetch metadata from {}".format(fileobj)) raise RuntimeError("Failed to fetch metadata from {}".format(fileobj))
......
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