File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed
src/torchcodec/decoders/_core Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -198,7 +198,7 @@ void convertAVFrameToFrameOutputOnCuda(
198198 " Expected format to be AV_PIX_FMT_CUDA, got " +
199199 std::string (av_get_pix_fmt_name ((AVPixelFormat)avFrame->format )));
200200 auto frameDims = getHeightAndWidthFromOptionsOrAVFrame (
201- videoStreamOptions, *( avFrame. get ()) );
201+ videoStreamOptions, avFrame);
202202 int height = frameDims.height ;
203203 int width = frameDims.width ;
204204 torch::Tensor& dst = frameOutput.data ;
Original file line number Diff line number Diff line change @@ -1205,7 +1205,7 @@ void VideoDecoder::convertAVFrameToFrameOutputOnCPU(
12051205 auto & streamInfo = streamInfos_[activeStreamIndex_];
12061206
12071207 auto frameDims = getHeightAndWidthFromOptionsOrAVFrame (
1208- streamInfo.videoStreamOptions , *( avFrame. get ()) );
1208+ streamInfo.videoStreamOptions , avFrame);
12091209 int expectedOutputHeight = frameDims.height ;
12101210 int expectedOutputWidth = frameDims.width ;
12111211
@@ -1941,10 +1941,10 @@ FrameDims getHeightAndWidthFromOptionsOrMetadata(
19411941
19421942FrameDims getHeightAndWidthFromOptionsOrAVFrame (
19431943 const VideoDecoder::VideoStreamOptions& videoStreamOptions,
1944- const AVFrame & avFrame) {
1944+ const UniqueAVFrame & avFrame) {
19451945 return FrameDims (
1946- videoStreamOptions.height .value_or (avFrame. height ),
1947- videoStreamOptions.width .value_or (avFrame. width ));
1946+ videoStreamOptions.height .value_or (avFrame-> height ),
1947+ videoStreamOptions.width .value_or (avFrame-> width ));
19481948}
19491949
19501950} // namespace facebook::torchcodec
Original file line number Diff line number Diff line change @@ -552,7 +552,7 @@ FrameDims getHeightAndWidthFromOptionsOrMetadata(
552552
553553FrameDims getHeightAndWidthFromOptionsOrAVFrame (
554554 const VideoDecoder::VideoStreamOptions& videoStreamOptions,
555- const AVFrame & avFrame);
555+ const UniqueAVFrame & avFrame);
556556
557557torch::Tensor allocateEmptyHWCTensor (
558558 int height,
You can’t perform that action at this time.
0 commit comments