Skip to content

Commit 0924e15

Browse files
committed
Disable cache if crop
1 parent 37bfdf7 commit 0924e15

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/spdl/io/_core.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1039,6 +1039,11 @@ def nvdec_decoder(
10391039
The old pattern of calling ``decoder.init()`` after ``nvdec_decoder()``
10401040
will be removed in a future version.
10411041
"""
1042+
# Force recreation if crop is provided, regardless of use_cache
1043+
crop_params = (crop_left, crop_top, crop_right, crop_bottom)
1044+
if any(param != 0 for param in crop_params):
1045+
use_cache = False
1046+
10421047
if use_cache:
10431048
decoder = _get_decoder()
10441049
decoder.reset()

0 commit comments

Comments
 (0)