Skip to content

Commit

Permalink
fix a flag
Browse files Browse the repository at this point in the history
  • Loading branch information
chenxinfeng committed Aug 4, 2024
1 parent 0ec2701 commit d277e56
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ffmpegcv/ffmpeg_reader_cuda.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ def __init__(self, vid:FFmpegReader, gpu=0, tensor_format='hwc'):
self.converter = load_cuda_module()[(vid.pix_fmt, tensor_format)]

def read(self, out_MAT:gpuarray.GPUArray=None) -> Tuple[bool, gpuarray.GPUArray]:
self.waitInit = True
self.waitInit = False
ret, frame_yuv420p = self.vid.read()
if not ret:
return False, None
Expand All @@ -219,7 +219,7 @@ def read(self, out_MAT:gpuarray.GPUArray=None) -> Tuple[bool, gpuarray.GPUArray]
return True, out_MAT

def read_cudamem(self, out_MAT:cuda.DeviceAllocation=None) -> Tuple[bool, cuda.DeviceAllocation]:
self.waitInit = True
self.waitInit = False
ret, frame_yuv420p = self.vid.read()
if not ret:
return False, None
Expand All @@ -235,7 +235,7 @@ def read_cudamem(self, out_MAT:cuda.DeviceAllocation=None) -> Tuple[bool, cuda.D

def read_torch(self, out_MAT=None):
import torch
self.waitInit = True
self.waitInit = False
ret, frame_yuv420p = self.vid.read()
if not ret:
return False, None
Expand Down

0 comments on commit d277e56

Please sign in to comment.