You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-03-02 08:53:52 -08:00
Use std::stoll to convert JSON values
This commit is contained in:
@@ -94,7 +94,7 @@ void ChunkReader::load_json()
|
||||
info.has_video = root["has_video"].asBool();
|
||||
info.has_audio = root["has_audio"].asBool();
|
||||
info.duration = root["duration"].asDouble();
|
||||
info.file_size = atoll(root["file_size"].asString().c_str());
|
||||
info.file_size = std::stoll(root["file_size"].asString());
|
||||
info.height = root["height"].asInt();
|
||||
info.width = root["width"].asInt();
|
||||
info.pixel_format = root["pixel_format"].asInt();
|
||||
@@ -106,7 +106,7 @@ void ChunkReader::load_json()
|
||||
info.display_ratio.num = root["display_ratio"]["num"].asInt();
|
||||
info.display_ratio.den = root["display_ratio"]["den"].asInt();
|
||||
info.vcodec = root["vcodec"].asString();
|
||||
info.video_length = atoll(root["video_length"].asString().c_str());
|
||||
info.video_length = std::stoll(root["video_length"].asString());
|
||||
info.video_stream_index = root["video_stream_index"].asInt();
|
||||
info.video_timebase.num = root["video_timebase"]["num"].asInt();
|
||||
info.video_timebase.den = root["video_timebase"]["den"].asInt();
|
||||
@@ -316,7 +316,7 @@ void ChunkReader::SetJsonValue(Json::Value root) {
|
||||
if (!root["path"].isNull())
|
||||
path = root["path"].asString();
|
||||
if (!root["chunk_size"].isNull())
|
||||
chunk_size = atoll(root["chunk_size"].asString().c_str());
|
||||
chunk_size = std::stoll(root["chunk_size"].asString());
|
||||
if (!root["chunk_version"].isNull())
|
||||
version = (ChunkVersion) root["chunk_version"].asInt();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user