File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
src/torchcodec/decoders/_core Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1248,7 +1248,7 @@ void VideoDecoder::convertAVFrameToFrameOutputOnCPU(
12481248 streamInfo.prevFrameContext = frameContext;
12491249 }
12501250 int resultHeight =
1251- convertAVFrameToTensorUsingSwsScale (avFrame. get () , outputTensor);
1251+ convertAVFrameToTensorUsingSwsScale (avFrame, outputTensor);
12521252 // If this check failed, it would mean that the frame wasn't reshaped to
12531253 // the expected height.
12541254 // TODO: Can we do the same check for width?
@@ -1299,7 +1299,7 @@ void VideoDecoder::convertAVFrameToFrameOutputOnCPU(
12991299}
13001300
13011301int VideoDecoder::convertAVFrameToTensorUsingSwsScale (
1302- const AVFrame* avFrame,
1302+ UniqueAVFrame& avFrame,
13031303 torch::Tensor& outputTensor) {
13041304 StreamInfo& activeStreamInfo = streamInfos_[activeStreamIndex_];
13051305 SwsContext* swsContext = activeStreamInfo.swsContext .get ();
Original file line number Diff line number Diff line change @@ -384,7 +384,7 @@ class VideoDecoder {
384384 const AVFrame* srcAVFrame);
385385
386386 int convertAVFrameToTensorUsingSwsScale (
387- const AVFrame* avFrame,
387+ UniqueAVFrame& avFrame,
388388 torch::Tensor& outputTensor);
389389
390390 UniqueAVFrame convertAudioAVFrameSampleFormat (
You can’t perform that action at this time.
0 commit comments