File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -1181,11 +1181,13 @@ void SingleStreamDecoder::convertAudioAVFrameToFrameOutputOnCPU(
11811181 int sourceNumChannels = getNumChannels (streamInfo.codecContext );
11821182 TORCH_CHECK (
11831183 sourceNumChannels == getNumChannels (srcAVFrame),
1184- " The Frame has " ,
1184+ " The frame has " ,
11851185 getNumChannels (srcAVFrame),
11861186 " channels, expected " ,
11871187 sourceNumChannels,
1188- " ." );
1188+ " . If you are hitting this, it may be because you are using "
1189+ " a buggy FFmpeg version. FFmpeg4 is known to fail here in some "
1190+ " valid scenarios. Try to upgrade FFmpeg?" );
11891191 int desiredNumChannels =
11901192 streamInfo.audioStreamOptions .numChannels .value_or (sourceNumChannels);
11911193
Original file line number Diff line number Diff line change @@ -1292,7 +1292,7 @@ def test_s16_ffmpeg4_bug(self):
12921292 assert decoder .metadata .sample_format == asset .sample_format
12931293
12941294 cm = (
1295- pytest .raises (RuntimeError , match = "Invalid argument " )
1295+ pytest .raises (RuntimeError , match = "The frame has 0 channels, expected 1. " )
12961296 if get_ffmpeg_major_version () == 4
12971297 else contextlib .nullcontext ()
12981298 )
You can’t perform that action at this time.
0 commit comments