From bafebe133245b5164a7cd6e40ed6b0d88c895715 Mon Sep 17 00:00:00 2001 From: Timm Linder Date: Sun, 23 Aug 2020 01:01:45 +0200 Subject: [PATCH] Fix #63, regression in compressed_depth_image_transport with old bags --- compressed_depth_image_transport/src/codec.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compressed_depth_image_transport/src/codec.cpp b/compressed_depth_image_transport/src/codec.cpp index 7ac9c2e..18a0659 100644 --- a/compressed_depth_image_transport/src/codec.cpp +++ b/compressed_depth_image_transport/src/codec.cpp @@ -82,6 +82,8 @@ sensor_msgs::Image::Ptr decodeCompressedDepthImage(const sensor_msgs::Compressed compression_format = "png"; } else if (format.find("compressedDepth rvl") != std::string::npos) { compression_format = "rvl"; + } else if (format.find("compressedDepth") != std::string::npos && format.find("compressedDepth ") == std::string::npos) { + compression_format = "png"; } else { ROS_ERROR("Unsupported image format: %s", message.format.c_str()); return sensor_msgs::Image::Ptr();