From b879d0112444057843769d1fa67fd2bf3f17d98e Mon Sep 17 00:00:00 2001 From: Jonathan Thomas Date: Fri, 30 May 2025 16:22:42 -0500 Subject: [PATCH] Removing sstream usage from ReaderBase (godot crash) when calling << on the stringstream (probably due to ABI issues on libstdc++.so --- src/ReaderBase.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/ReaderBase.cpp b/src/ReaderBase.cpp index c2cf0552..6a07ab75 100644 --- a/src/ReaderBase.cpp +++ b/src/ReaderBase.cpp @@ -12,7 +12,6 @@ #include #include -#include #include "ReaderBase.h" #include "ClipBase.h" @@ -112,9 +111,7 @@ Json::Value ReaderBase::JsonValue() const { root["has_audio"] = info.has_audio; root["has_single_image"] = info.has_single_image; root["duration"] = info.duration; - std::stringstream filesize_stream; - filesize_stream << info.file_size; - root["file_size"] = filesize_stream.str(); + root["file_size"] = static_cast(info.file_size); // direct 64-bit int root["height"] = info.height; root["width"] = info.width; root["pixel_format"] = info.pixel_format; @@ -129,9 +126,7 @@ Json::Value ReaderBase::JsonValue() const { root["display_ratio"]["num"] = info.display_ratio.num; root["display_ratio"]["den"] = info.display_ratio.den; root["vcodec"] = info.vcodec; - std::stringstream video_length_stream; - video_length_stream << info.video_length; - root["video_length"] = video_length_stream.str(); + root["video_length"] = static_cast(info.video_length); root["video_stream_index"] = info.video_stream_index; root["video_timebase"] = Json::Value(Json::objectValue); root["video_timebase"]["num"] = info.video_timebase.num;