Skip to content

Commit f49d507

Browse files
committed
Skip wav on FFmpeg4
1 parent a0dcafd commit f49d507

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/test_ops.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
from .utils import (
4545
assert_frames_equal,
4646
cpu_and_cuda,
47+
get_ffmpeg_major_version,
4748
in_fbcode,
4849
NASA_AUDIO,
4950
NASA_AUDIO_MP3,
@@ -1125,6 +1126,10 @@ def test_bad_input(self, tmp_path):
11251126
@pytest.mark.parametrize("output_format", ("wav", "flac"))
11261127
def test_round_trip(self, output_format, tmp_path):
11271128
# Check that decode(encode(samples)) == samples on lossless formats
1129+
1130+
if get_ffmpeg_major_version() == 4 and output_format == "wav":
1131+
pytest.skip("Swresample with FFmpeg 4 doesn't work on wav files")
1132+
11281133
asset = NASA_AUDIO_MP3
11291134
source_samples = self.decode(asset)
11301135

@@ -1146,6 +1151,9 @@ def test_against_cli(self, asset, bit_rate, output_format, tmp_path):
11461151
# Encodes samples with our encoder and with the FFmpeg CLI, and checks
11471152
# that both decoded outputs are equal
11481153

1154+
if get_ffmpeg_major_version() == 4 and output_format == "wav":
1155+
pytest.skip("Swresample with FFmpeg 4 doesn't work on wav files")
1156+
11491157
encoded_by_ffmpeg = tmp_path / f"ffmpeg_output.{output_format}"
11501158
encoded_by_us = tmp_path / f"our_output.{output_format}"
11511159

0 commit comments

Comments
 (0)