Skip to content

Commit 2342837

Browse files
committed
remove repeat torch_check
1 parent 15e23f6 commit 2342837

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

src/torchcodec/_core/Encoder.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -912,11 +912,6 @@ UniqueAVFrame VideoEncoder::convertTensorToAVFrame(
912912
const torch::Tensor& frame,
913913
int frameIndex) {
914914
TORCH_CHECK(frame.is_cpu(), "CPU encoder requires CPU tensors");
915-
TORCH_CHECK(
916-
frame.dim() == 3 && frame.size(0) == 3,
917-
"Expected 3D RGB tensor (CHW format), got shape: ",
918-
frame.sizes());
919-
920915
// Initialize and cache scaling context if it does not exist
921916
if (!swsContext_) {
922917
swsContext_.reset(sws_getContext(

0 commit comments

Comments
 (0)