@@ -2620,6 +2620,12 @@ def test_audio_to_file_vs_to_file_like(self, tmp_path, format):
26202620 audio_fl .write (source_samples )
26212621 enc_fl .close ()
26222622
2623+ if IS_WINDOWS_WITH_FFMPEG_LE_70 and format == "mp3" :
2624+ # We're getting a "Could not open input file" on Windows mp3
2625+ # files when decoding.
2626+ # TODO: https://github.com/pytorch/torchcodec/issues/837
2627+ return
2628+
26232629 decoded_from_file = AudioDecoder (str (file_path )).get_all_samples ().data
26242630 decoded_from_file_like = (
26252631 AudioDecoder (file_like .getvalue ()).get_all_samples ().data
@@ -3578,11 +3584,8 @@ def test_add_audio_unsupported_num_channels_errors(self, method, tmp_path):
35783584 sub = tmp_path / "ten_ch"
35793585 sub .mkdir ()
35803586 enc2 , _ , open_kwargs2 = self ._create_encoder (method , sub , "wav" )
3581- audio2 = enc2 .add_audio (sample_rate = 44100 , num_channels = 10 )
3582- enc2 .open (** open_kwargs2 )
3583- samples = torch .randn (10 , 1000 )
35843587 with pytest .raises (RuntimeError , match = "Trying to encode 10 channels" ):
3585- audio2 . write ( samples )
3588+ enc2 . add_audio ( sample_rate = 44100 , num_channels = 10 )
35863589
35873590 @pytest .mark .parametrize ("method" , ("to_file" , "to_file_like" ))
35883591 def test_add_audio_invalid_output_sample_rate_errors (self , method , tmp_path ):
0 commit comments