Skip to content

Commit

Permalink
[Decode] Avoid pointer offset check in condition (#7149)
Browse files Browse the repository at this point in the history
It may trigger compiling warning and cause unexpected result
  • Loading branch information
gfxVPLsdm authored Jul 26, 2024
1 parent eff7c6f commit 872ccc1
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2004-2019 Intel Corporation
// Copyright (c) 2004-2024 Intel Corporation
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -1212,7 +1212,7 @@ namespace UMC
else
Offset = PicHeaderSize;

if (*(p_CurOffsets+1) && p_CurOriginalOffsets && (p_CurOriginalOffsets + 1))
if (*(p_CurOffsets+1) && p_CurOriginalOffsets)
SliceSize = *(p_CurOriginalOffsets+1) - *p_CurOriginalOffsets - Offset;
else
SliceSize = this->m_pContext->m_FrameSize - Offset;
Expand Down

0 comments on commit 872ccc1

Please sign in to comment.