File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
src/torchcodec/decoders/_core Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -1268,7 +1268,7 @@ void VideoDecoder::convertAVFrameToFrameOutputOnCPU(
12681268 createFilterGraph (streamInfo, expectedOutputHeight, expectedOutputWidth);
12691269 streamInfo.prevFrameContext = frameContext;
12701270 }
1271- outputTensor = convertAVFrameToTensorUsingFilterGraph (avFrame. get () );
1271+ outputTensor = convertAVFrameToTensorUsingFilterGraph (avFrame);
12721272
12731273 // Similarly to above, if this check fails it means the frame wasn't
12741274 // reshaped to its expected dimensions by filtergraph.
@@ -1319,11 +1319,11 @@ int VideoDecoder::convertAVFrameToTensorUsingSwsScale(
13191319}
13201320
13211321torch::Tensor VideoDecoder::convertAVFrameToTensorUsingFilterGraph (
1322- const AVFrame* avFrame) {
1322+ const UniqueAVFrame& avFrame) {
13231323 FilterGraphContext& filterGraphContext =
13241324 streamInfos_[activeStreamIndex_].filterGraphContext ;
13251325 int status =
1326- av_buffersrc_write_frame (filterGraphContext.sourceContext , avFrame);
1326+ av_buffersrc_write_frame (filterGraphContext.sourceContext , avFrame. get () );
13271327 if (status < AVSUCCESS) {
13281328 throw std::runtime_error (" Failed to add frame to buffer source context" );
13291329 }
Original file line number Diff line number Diff line change @@ -376,12 +376,12 @@ class VideoDecoder {
376376 std::optional<torch::Tensor> preAllocatedOutputTensor = std::nullopt );
377377
378378 void convertAudioAVFrameToFrameOutputOnCPU (
379- UniqueAVFrame& avFrame ,
379+ UniqueAVFrame& srcAVFrame ,
380380 FrameOutput& frameOutput,
381381 std::optional<torch::Tensor> preAllocatedOutputTensor = std::nullopt );
382382
383383 torch::Tensor convertAVFrameToTensorUsingFilterGraph (
384- const AVFrame* srcAVFrame );
384+ const UniqueAVFrame& avFrame );
385385
386386 int convertAVFrameToTensorUsingSwsScale (
387387 UniqueAVFrame& avFrame,
You can’t perform that action at this time.
0 commit comments