Skip to content

Commit 291bc87

Browse files
committed
Fix C++ tests
1 parent 72717bd commit 291bc87

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/torchcodec/decoders/_core/VideoDecoder.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1188,6 +1188,10 @@ VideoDecoder::RawDecodedOutput VideoDecoder::getNextRawDecodedOutputNoDemux() {
11881188
return rawOutput;
11891189
}
11901190

1191+
VideoDecoder::DecodedOutput VideoDecoder::getNextDecodedOutputNoDemux() {
1192+
auto preAllocatedOutputTensor = torch::empty({0});
1193+
return VideoDecoder::getNextDecodedOutputNoDemux(preAllocatedOutputTensor);
1194+
}
11911195
VideoDecoder::DecodedOutput VideoDecoder::getNextDecodedOutputNoDemux(
11921196
torch::Tensor& preAllocatedOutputTensor) {
11931197
auto rawOutput = getNextRawDecodedOutputNoDemux();

src/torchcodec/decoders/_core/VideoDecoder.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ class VideoDecoder {
214214
};
215215
// Decodes the frame where the current cursor position is. It also advances
216216
// the cursor to the next frame.
217+
DecodedOutput getNextDecodedOutputNoDemux();
217218
DecodedOutput getNextDecodedOutputNoDemux(
218219
torch::Tensor& preAllocatedOutputTensor);
219220
// Decodes the first frame in any added stream that is visible at a given

0 commit comments

Comments
 (0)