Skip to content

Commit 001bbc8

Browse files
committed
Clearer bitwise logic
1 parent 33ae295 commit 001bbc8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/torchcodec/_core/BetaCudaDeviceInterface.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ static UniqueCUvideodecoder createDecoder(CUVIDEOFORMAT* videoFormat) {
111111
// Below we'll set the decoderParams.OutputFormat to NV12, so we need to make
112112
// sure it's actually supported.
113113
TORCH_CHECK(
114-
caps.nOutputFormatMask & (1 << cudaVideoSurfaceFormat_NV12),
114+
(caps.nOutputFormatMask >> cudaVideoSurfaceFormat_NV12) & 1,
115115
"NV12 output format is not supported for this configuration. ",
116116
"Codec: ",
117117
static_cast<int>(videoFormat->codec),

0 commit comments

Comments
 (0)