From ac6db5c1c1cd7a740dc486ab1722f0ae525e2753 Mon Sep 17 00:00:00 2001 From: Dong Yu Date: Sat, 18 May 2024 15:52:50 +0800 Subject: [PATCH] optimize initial value of isHdr Signed-off-by: Dong Yu --- services/engine/histreamer/player/hiplayer_impl.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/services/engine/histreamer/player/hiplayer_impl.cpp b/services/engine/histreamer/player/hiplayer_impl.cpp index 567e94517..69fe2f2ab 100755 --- a/services/engine/histreamer/player/hiplayer_impl.cpp +++ b/services/engine/histreamer/player/hiplayer_impl.cpp @@ -1195,9 +1195,9 @@ int32_t HiPlayerImpl::GetVideoTrackInfo(std::vector& videoTrack) Plugins::VideoRotation rotation; trackInfo->Get(rotation); videoTrackInfo.PutIntValue(Tag::VIDEO_ROTATION, rotation); - bool hdr; - trackInfo->GetData(Tag::VIDEO_IS_HDR_VIVID, hdr); - if (hdr) { + bool isHdr = false; + trackInfo->GetData(Tag::VIDEO_IS_HDR_VIVID, isHdr); + if (isHdr) { playStatisticalInfo_.hdrType = static_cast(VideoHdrType::VIDEO_HDR_TYPE_VIVID); } else { playStatisticalInfo_.hdrType = static_cast(VideoHdrType::VIDEO_HDR_TYPE_NONE); -- Gitee