@@ -185,7 +185,7 @@ void initializeContextOnCuda(
185185
186186void convertAVFrameToDecodedOutputOnCuda (
187187 const torch::Device& device,
188- const VideoDecoder::VideoStreamOptions& options ,
188+ const VideoDecoder::VideoStreamOptions& videoStreamOptions ,
189189 VideoDecoder::RawDecodedOutput& rawOutput,
190190 VideoDecoder::DecodedOutput& output,
191191 std::optional<torch::Tensor> preAllocatedOutputTensor) {
@@ -195,7 +195,8 @@ void convertAVFrameToDecodedOutputOnCuda(
195195 src->format == AV_PIX_FMT_CUDA,
196196 " Expected format to be AV_PIX_FMT_CUDA, got " +
197197 std::string (av_get_pix_fmt_name ((AVPixelFormat)src->format )));
198- auto frameDims = getHeightAndWidthFromOptionsOrAVFrame (options, *src);
198+ auto frameDims =
199+ getHeightAndWidthFromOptionsOrAVFrame (videoStreamOptions, *src);
199200 int height = frameDims.height ;
200201 int width = frameDims.width ;
201202 torch::Tensor& dst = output.frame ;
@@ -212,7 +213,7 @@ void convertAVFrameToDecodedOutputOnCuda(
212213 " x3, got " ,
213214 shape);
214215 } else {
215- dst = allocateEmptyHWCTensor (height, width, options .device );
216+ dst = allocateEmptyHWCTensor (height, width, videoStreamOptions .device );
216217 }
217218
218219 // Use the user-requested GPU for running the NPP kernel.
0 commit comments