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(
1170
1170
getDuration (avFrame),
1171
1171
formatContext_->streams [activeStreamIndex_]->time_base );
1172
1172
if (streamInfo.avMediaType == AVMEDIA_TYPE_AUDIO) {
1173
- convertAudioAVFrameToFrameOutputOnCPU (
1174
- avFrame, frameOutput, preAllocatedOutputTensor);
1173
+ convertAudioAVFrameToFrameOutputOnCPU (avFrame, frameOutput);
1175
1174
} else if (streamInfo.videoStreamOptions .device .type () == torch::kCPU ) {
1176
1175
convertAVFrameToFrameOutputOnCPU (
1177
1176
avFrame, frameOutput, preAllocatedOutputTensor);
@@ -1349,11 +1348,7 @@ torch::Tensor VideoDecoder::convertAVFrameToTensorUsingFilterGraph(
1349
1348
1350
1349
void VideoDecoder::convertAudioAVFrameToFrameOutputOnCPU (
1351
1350
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) {
1357
1352
1358
1353
AVSampleFormat sourceSampleFormat =
1359
1354
static_cast <AVSampleFormat>(srcAVFrame->format );
Original file line number Diff line number Diff line change @@ -391,8 +391,7 @@ class VideoDecoder {
391
391
392
392
void convertAudioAVFrameToFrameOutputOnCPU (
393
393
UniqueAVFrame& srcAVFrame,
394
- FrameOutput& frameOutput,
395
- std::optional<torch::Tensor> preAllocatedOutputTensor = std::nullopt);
394
+ FrameOutput& frameOutput);
396
395
397
396
torch::Tensor convertAVFrameToTensorUsingFilterGraph (
398
397
const UniqueAVFrame& avFrame);
You can’t perform that action at this time.
0 commit comments