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

Set the default ffmpeg log level to FATAL (#2447)

Summary:
With the default log-level, completely sane operation like converting
YUV to RGB issues bunch of warnings like

`[swscaler @ 0x128aa8000] No accelerated colorspace conversion found from yuv420p to rgb24.`

This commit sets the log level to FATAL.

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

Reviewed By: hwangjeff

Differential Revision: D36938728

Pulled By: mthrok

fbshipit-source-id: 39c2e6a4307f1eac577fd606e17ab0f298079b54
parent a63629b6
...@@ -74,6 +74,8 @@ def _init_ffmpeg(): ...@@ -74,6 +74,8 @@ def _init_ffmpeg():
import torchaudio._torchaudio_ffmpeg # noqa import torchaudio._torchaudio_ffmpeg # noqa
torch.ops.torchaudio.ffmpeg_init() torch.ops.torchaudio.ffmpeg_init()
if torch.ops.torchaudio.ffmpeg_get_log_level() > 8:
torch.ops.torchaudio.ffmpeg_set_log_level(8)
_FFMPEG_INITIALIZED = True _FFMPEG_INITIALIZED = True
......
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