Skip to content

Commit 0568482

Browse files
committed
getFrameAtIndexInternal now *must* take preAllocatedTensor
1 parent 3ab551e commit 0568482

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/torchcodec/decoders/_core/VideoDecoder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1032,7 +1032,7 @@ VideoDecoder::DecodedOutput VideoDecoder::getFrameAtIndex(
10321032
VideoDecoder::DecodedOutput VideoDecoder::getFrameAtIndexInternal(
10331033
int streamIndex,
10341034
int64_t frameIndex,
1035-
std::optional<torch::Tensor> preAllocatedOutputTensor) {
1035+
torch::Tensor preAllocatedOutputTensor) {
10361036
validateUserProvidedStreamIndex(streamIndex);
10371037
validateScannedAllStreams("getFrameAtIndex");
10381038

src/torchcodec/decoders/_core/VideoDecoder.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ class VideoDecoder {
232232
DecodedOutput getFrameAtIndexInternal(
233233
int streamIndex,
234234
int64_t frameIndex,
235-
std::optional<torch::Tensor> preAllocatedOutputTensor = std::nullopt);
235+
torch::Tensor preAllocatedOutputTensor);
236236

237237
struct BatchDecodedOutput {
238238
torch::Tensor frames;

0 commit comments

Comments
 (0)