Skip to content

Commit 621a64c

Browse files
committed
Frame again
1 parent d914615 commit 621a64c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/torchcodec/decoders/_core/VideoDecoder.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -901,7 +901,7 @@ VideoDecoder::RawDecodedOutput VideoDecoder::getDecodedOutputWithFilter(
901901
activeStreamInfo.currentDuration = getDuration(avFrame);
902902
RawDecodedOutput rawOutput;
903903
rawOutput.streamIndex = frameStreamIndex;
904-
rawOutput.frame = std::move(avFrame);
904+
rawOutput.avFrame = std::move(avFrame);
905905
return rawOutput;
906906
}
907907

@@ -911,7 +911,7 @@ VideoDecoder::DecodedOutput VideoDecoder::convertAVFrameToDecodedOutput(
911911
// Convert the frame to tensor.
912912
DecodedOutput output;
913913
int streamIndex = rawOutput.streamIndex;
914-
AVFrame* avFrame = rawOutput.frame.get();
914+
AVFrame* avFrame = rawOutput.avFrame.get();
915915
output.streamIndex = streamIndex;
916916
auto& streamInfo = streamInfos_[streamIndex];
917917
TORCH_CHECK(streamInfo.stream->codecpar->codec_type == AVMEDIA_TYPE_VIDEO);
@@ -951,7 +951,7 @@ void VideoDecoder::convertAVFrameToDecodedOutputOnCPU(
951951
DecodedOutput& output,
952952
std::optional<torch::Tensor> preAllocatedOutputTensor) {
953953
int streamIndex = rawOutput.streamIndex;
954-
AVFrame* avFrame = rawOutput.frame.get();
954+
AVFrame* avFrame = rawOutput.avFrame.get();
955955
auto& streamInfo = streamInfos_[streamIndex];
956956

957957
auto frameDims =

src/torchcodec/decoders/_core/VideoDecoder.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ class VideoDecoder {
168168
// Note that AVFrame itself doesn't retain the streamIndex.
169169
struct RawDecodedOutput {
170170
// The actual decoded output as a unique pointer to an AVFrame.
171-
UniqueAVFrame frame;
171+
UniqueAVFrame avFrame;
172172
// The stream index of the decoded frame.
173173
int streamIndex;
174174
};

0 commit comments

Comments
 (0)