修复ts文件大于3GB时,获取文件大小异常的问题

This commit is contained in:
ziyue 2022-02-23 17:01:53 +08:00
parent 147ba6147c
commit 4a7f5796ba

View File

@ -136,9 +136,7 @@ void HlsMakerImp::onFlushLastSegment(uint32_t duration_ms) {
GET_CONFIG(bool, broadcastRecordTs, Hls::kBroadcastRecordTs);
if (broadcastRecordTs) {
_info.time_len = duration_ms / 1000.0f;
struct stat fileData;
stat(_info.file_path.data(), &fileData);
_info.file_size = fileData.st_size;
_info.file_size = File::fileSize(_info.file_path.data());
NoticeCenter::Instance().emitEvent(Broadcast::kBroadcastRecordTs, _info);
}
}