Skip to content

Commit

Permalink
[Decode] fix kw issues(CL#777411)
Browse files Browse the repository at this point in the history
fix kw issues

Change-Id: Iee57216bb82824cafa75dd8b32117de16ee8300b
  • Loading branch information
ZefuLI authored and oliver-sang committed Jun 29, 2018
1 parent 8f2fdb9 commit 4e6e44c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,8 @@ MOS_STATUS CodechalDecodeMpeg2::AllocateResources ()

CodechalResLock DummyBitstreamLock(m_osInterface, &m_resMpeg2DummyBistream);
auto data = DummyBitstreamLock.Lock(CodechalResLock::writeOnly);

CODECHAL_DECODE_CHK_NULL_RETURN(data);

MOS_ZeroMemory(data, size);
CODECHAL_DECODE_CHK_STATUS_MESSAGE_RETURN(MOS_SecureMemcpy(
Expand All @@ -435,6 +437,7 @@ MOS_STATUS CodechalDecodeMpeg2::AllocateResources ()
(void *)CODECHAL_DECODE_MPEG2_WaDummyBitstream,
sizeof(CODECHAL_DECODE_MPEG2_WaDummyBitstream)),
"Failed to copy memory.");

}

if (m_mode == CODECHAL_DECODE_MODE_MPEG2IDCT)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -804,6 +804,8 @@ MOS_STATUS CodechalDecodeVp8::ParseFrameHead(uint8_t* bitstreamBuffer, uint32_t
CodechalResLock ResourceLock(m_osInterface, &m_resCoefProbBuffer);
auto data = (uint8_t*)ResourceLock.Lock(CodechalResLock::writeOnly);

CODECHAL_DECODE_CHK_NULL_RETURN(data);

MOS_SecureMemcpy(
data,
sizeof(m_vp8FrameHead.FrameContext.CoefProbs),
Expand Down

0 comments on commit 4e6e44c

Please sign in to comment.