File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -189,10 +189,11 @@ void CudaDeviceInterface::initialize(
189
189
AVCodecContext* codecContext,
190
190
[[maybe_unused]] const VideoStreamOptions& videoStreamOptions,
191
191
[[maybe_unused]] const std::vector<std::unique_ptr<Transform>>& transforms,
192
- [[maybe_unused]] const AVRational& timeBase,
192
+ const AVRational& timeBase,
193
193
const FrameDims& outputDims) {
194
194
TORCH_CHECK (!ctx_, " FFmpeg HW device context already initialized" );
195
195
196
+ timeBase_ = timeBase;
196
197
outputDims_ = outputDims;
197
198
198
199
// It is important for pytorch itself to create the cuda context. If ffmpeg
Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ class CudaDeviceInterface : public DeviceInterface {
34
34
std::nullopt ) override ;
35
35
36
36
private:
37
+ AVRational timeBase_;
37
38
FrameDims outputDims_;
38
39
UniqueAVBufferRef ctx_;
39
40
std::unique_ptr<NppStreamContext> nppCtx_;
You can’t perform that action at this time.
0 commit comments