From d39559bb315e08dd6a50742a817ebe7e8c5b17ca Mon Sep 17 00:00:00 2001 From: jcdr428 Date: Thu, 10 Aug 2023 09:22:31 +0100 Subject: [PATCH] Fix cast --- tsMuxer/ioContextDemuxer.cpp | 4 ++-- tsMuxer/ioContextDemuxer.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tsMuxer/ioContextDemuxer.cpp b/tsMuxer/ioContextDemuxer.cpp index ad4011ff..4684f5b1 100644 --- a/tsMuxer/ioContextDemuxer.cpp +++ b/tsMuxer/ioContextDemuxer.cpp @@ -13,14 +13,14 @@ using namespace std; #endif ///////////////////////////////////// -double av_int2dbl(const int64_t v) +double av_int2dbl(const uint64_t v) { if (v + v > 0xFFEULL << 52) return 0; // 0.0/0.0; return ldexp(static_cast((v & ((1LL << 52) - 1)) + (1LL << 52)) * (v >> 63 | 1), (v >> 52 & 0x7FF) - 1075); } -float av_int2flt(const int32_t v) +float av_int2flt(const uint32_t v) { if (v + v > 0xFF000000U) return 0; // 0.0/0.0; diff --git a/tsMuxer/ioContextDemuxer.h b/tsMuxer/ioContextDemuxer.h index 31948bc9..9257d09f 100644 --- a/tsMuxer/ioContextDemuxer.h +++ b/tsMuxer/ioContextDemuxer.h @@ -39,8 +39,8 @@ enum class IOContextTrackType DATA = 0x40 }; -double av_int2dbl(int64_t v); -float av_int2flt(int32_t v); +double av_int2dbl(uint64_t v); +float av_int2flt(uint32_t v); struct Track {