Skip to content

Commit 146e238

Browse files
author
pytorchbot
committed
2024-11-12 nightly release (7d077f1)
1 parent 1e597e6 commit 146e238

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

torchvision/csrc/io/image/cpu/decode_webp.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,10 @@ torch::Tensor decode_webp(
4444

4545
auto decoded_data =
4646
decoding_func(encoded_data_p, encoded_data_size, &width, &height);
47-
4847
TORCH_CHECK(decoded_data != nullptr, "WebPDecodeRGB[A] failed.");
4948

50-
auto deleter = [decoded_data](void*) { WebPFree(decoded_data); };
5149
auto out = torch::from_blob(
52-
decoded_data, {height, width, num_channels}, deleter, torch::kUInt8);
50+
decoded_data, {height, width, num_channels}, torch::kUInt8);
5351

5452
return out.permute({2, 0, 1});
5553
}

0 commit comments

Comments
 (0)