File tree Expand file tree Collapse file tree 2 files changed +3
-9
lines changed
src/torchcodec/decoders/_core Expand file tree Collapse file tree 2 files changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -1170,8 +1170,7 @@ VideoDecoder::FrameOutput VideoDecoder::convertAVFrameToFrameOutput(
11701170 getDuration (avFrame),
11711171 formatContext_->streams [activeStreamIndex_]->time_base );
11721172 if (streamInfo.avMediaType == AVMEDIA_TYPE_AUDIO) {
1173- convertAudioAVFrameToFrameOutputOnCPU (
1174- avFrame, frameOutput, preAllocatedOutputTensor);
1173+ convertAudioAVFrameToFrameOutputOnCPU (avFrame, frameOutput);
11751174 } else if (streamInfo.videoStreamOptions .device .type () == torch::kCPU ) {
11761175 convertAVFrameToFrameOutputOnCPU (
11771176 avFrame, frameOutput, preAllocatedOutputTensor);
@@ -1349,11 +1348,7 @@ torch::Tensor VideoDecoder::convertAVFrameToTensorUsingFilterGraph(
13491348
13501349void VideoDecoder::convertAudioAVFrameToFrameOutputOnCPU (
13511350 UniqueAVFrame& srcAVFrame,
1352- FrameOutput& frameOutput,
1353- std::optional<torch::Tensor> preAllocatedOutputTensor) {
1354- TORCH_CHECK (
1355- !preAllocatedOutputTensor.has_value (),
1356- " pre-allocated audio tensor not supported yet." );
1351+ FrameOutput& frameOutput) {
13571352
13581353 AVSampleFormat sourceSampleFormat =
13591354 static_cast <AVSampleFormat>(srcAVFrame->format );
Original file line number Diff line number Diff line change @@ -391,8 +391,7 @@ class VideoDecoder {
391391
392392 void convertAudioAVFrameToFrameOutputOnCPU (
393393 UniqueAVFrame& srcAVFrame,
394- FrameOutput& frameOutput,
395- std::optional<torch::Tensor> preAllocatedOutputTensor = std::nullopt );
394+ FrameOutput& frameOutput);
396395
397396 torch::Tensor convertAVFrameToTensorUsingFilterGraph (
398397 const UniqueAVFrame& avFrame);
You can’t perform that action at this time.
0 commit comments