@@ -1399,7 +1399,7 @@ void VideoDecoder::convertAudioAVFrameToFrameOutputOnCPU(
13991399}
14001400
14011401UniqueAVFrame VideoDecoder::convertAudioAVFrameSampleFormatAndSampleRate (
1402- const UniqueAVFrame& avFrame ,
1402+ const UniqueAVFrame& srcAVFrame ,
14031403 AVSampleFormat sourceSampleFormat,
14041404 AVSampleFormat desiredSampleFormat,
14051405 int sourceSampleRate,
@@ -1420,7 +1420,7 @@ UniqueAVFrame VideoDecoder::convertAudioAVFrameSampleFormatAndSampleRate(
14201420 convertedAVFrame,
14211421 " Could not allocate frame for sample format conversion." );
14221422
1423- setChannelLayout (convertedAVFrame, avFrame );
1423+ setChannelLayout (convertedAVFrame, srcAVFrame );
14241424 convertedAVFrame->format = static_cast <int >(desiredSampleFormat);
14251425 convertedAVFrame->sample_rate = desiredSampleRate;
14261426 if (sourceSampleRate != desiredSampleRate) {
@@ -1431,12 +1431,12 @@ UniqueAVFrame VideoDecoder::convertAudioAVFrameSampleFormatAndSampleRate(
14311431 // `swr_convert()`.
14321432 convertedAVFrame->nb_samples = av_rescale_rnd (
14331433 swr_get_delay (streamInfo.swrContext .get (), sourceSampleRate) +
1434- avFrame ->nb_samples ,
1434+ srcAVFrame ->nb_samples ,
14351435 desiredSampleRate,
14361436 sourceSampleRate,
14371437 AV_ROUND_UP);
14381438 } else {
1439- convertedAVFrame->nb_samples = avFrame ->nb_samples ;
1439+ convertedAVFrame->nb_samples = srcAVFrame ->nb_samples ;
14401440 }
14411441
14421442 auto status = av_frame_get_buffer (convertedAVFrame.get (), 0 );
@@ -1449,8 +1449,8 @@ UniqueAVFrame VideoDecoder::convertAudioAVFrameSampleFormatAndSampleRate(
14491449 streamInfo.swrContext .get (),
14501450 convertedAVFrame->data ,
14511451 convertedAVFrame->nb_samples ,
1452- static_cast <const uint8_t **>(const_cast <const uint8_t **>(avFrame ->data )),
1453- avFrame ->nb_samples );
1452+ static_cast <const uint8_t **>(const_cast <const uint8_t **>(srcAVFrame ->data )),
1453+ srcAVFrame ->nb_samples );
14541454 TORCH_CHECK (
14551455 numConvertedSamples > 0 ,
14561456 " Error in swr_convert: " ,
0 commit comments