From 9233b5a53c6b62187cdf3c164c3de0d39bc3a4d2 Mon Sep 17 00:00:00 2001 From: Chris Tallon Date: Thu, 21 May 2020 16:14:07 +0100 Subject: [PATCH] 2 CWFs in videoomx.h --- videoomx.h | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/videoomx.h b/videoomx.h index 1143349..c78e5e6 100644 --- a/videoomx.h +++ b/videoomx.h @@ -132,17 +132,16 @@ class VideoOMX : public Video int test2(); #endif - - - static inline OMX_TICKS intToOMXTicks(long long pts) { - OMX_TICKS temp; - temp.nLowPart=pts; - temp.nHighPart=pts>>32; - return temp; + static inline OMX_TICKS intToOMXTicks(long long pts) + { + OMX_TICKS temp; + // Assigning a long long int to an int drops the MSBs which is what we want here + // But to avoid a -Wconversion warning, cast it + temp.nLowPart = static_cast(pts); + temp.nHighPart = static_cast(pts >> 32); + return temp; } - - private: int EnterIframePlayback(); bool iframemode; -- 2.39.2