File tree 1 file changed +7
-12
lines changed
media_driver/agnostic/common/codec/hal
1 file changed +7
-12
lines changed Original file line number Diff line number Diff line change @@ -218,10 +218,13 @@ MOS_STATUS CodechalDecodeMpeg2::CopyDataSurface(
218
218
" Failed to allocate copied residual data buffer." );
219
219
}
220
220
221
- // initialize lock flags
222
- MOS_LOCK_PARAMS lockFlagsWriteOnly;
223
- MOS_ZeroMemory (&lockFlagsWriteOnly, sizeof (MOS_LOCK_PARAMS));
224
- lockFlagsWriteOnly.WriteOnly = 1 ;
221
+ if ((m_nextCopiedDataOffset + dataSize) > m_copiedDataBufferSize)
222
+ {
223
+ CODECHAL_DECODE_ASSERTMESSAGE (" Copied data buffer is not large enough." );
224
+
225
+ m_slicesInvalid = true ;
226
+ return MOS_STATUS_UNKNOWN;
227
+ }
225
228
226
229
uint32_t size = MOS_ALIGN_CEIL (dataSize, 16 ); // 16 byte aligned
227
230
@@ -245,14 +248,6 @@ MOS_STATUS CodechalDecodeMpeg2::CopyDataSurface(
245
248
return MOS_STATUS_SUCCESS;
246
249
}
247
250
248
- if ((m_nextCopiedDataOffset + dataSize) > m_copiedDataBufferSize)
249
- {
250
- CODECHAL_DECODE_ASSERTMESSAGE (" Copied data buffer is not large enough." );
251
-
252
- m_slicesInvalid = true ;
253
- return MOS_STATUS_UNKNOWN;
254
- }
255
-
256
251
CODECHAL_DECODE_CHK_STATUS_RETURN (m_osInterface->pfnSetGpuContext (
257
252
m_osInterface,
258
253
m_videoContextForWa));
You can’t perform that action at this time.
0 commit comments