File tree Expand file tree Collapse file tree 3 files changed +13
-7
lines changed
Expand file tree Collapse file tree 3 files changed +13
-7
lines changed Original file line number Diff line number Diff line change 33import torch
44
55from ..utils import _log_api_usage_once
6+
7+ try :
8+ from ._load_gpu_decoder import _HAS_VIDEO_DECODER
9+ except ModuleNotFoundError :
10+ _HAS_VIDEO_DECODER = False
611from ._video_opt import (
712 Timebase ,
813 VideoMetaData ,
9- _HAS_VIDEO_DECODER ,
1014 _HAS_VIDEO_OPT ,
1115 _probe_video_from_file ,
1216 _probe_video_from_memory ,
Original file line number Diff line number Diff line change 1+ from ..extension import _load_library
2+
3+
4+ try :
5+ _load_library ("Decoder" )
6+ _HAS_VIDEO_DECODER = True
7+ except (ImportError , OSError ):
8+ _HAS_VIDEO_DECODER = False
Original file line number Diff line number Diff line change 1414except (ImportError , OSError ):
1515 _HAS_VIDEO_OPT = False
1616
17- try :
18- _load_library ("Decoder" )
19- _HAS_VIDEO_DECODER = True
20- except (ImportError , OSError ):
21- _HAS_VIDEO_DECODER = False
22-
2317default_timebase = Fraction (0 , 1 )
2418
2519
You can’t perform that action at this time.
0 commit comments