Skip to content

Commit eee6b1e

Browse files
leyu-yaointel-mediadev
authored andcommitted
[Encode] Fix nullptr for vp9 packer
vp9 segment par to ddiContext
1 parent e5697c6 commit eee6b1e

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

media_driver/linux/common/codec/ddi/media_ddi_encode_vp9.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,7 @@ VAStatus DdiEncodeVp9::ContextInitialize(CodechalSetting *codecHalSettings)
379379
// Allocate segment params
380380
m_segParams = (CODEC_VP9_ENCODE_SEGMENT_PARAMS *)MOS_AllocAndZeroMemory(sizeof(CODEC_VP9_ENCODE_SEGMENT_PARAMS) * 8);
381381
DDI_CHK_NULL(m_segParams, "nullptr m_segParams.", VA_STATUS_ERROR_ALLOCATION_FAILED);
382+
m_encodeCtx->pVpxSegParams = (void*)m_segParams;
382383

383384
// Allocate coded buffer status
384385
m_codedBufStatus = (VACodedBufferVP9Status *)MOS_AllocAndZeroMemory(DDI_ENCODE_MAX_STATUS_REPORT_BUFFER * sizeof(VACodedBufferVP9Status));

media_softlet/linux/common/codec/ddi/enc/ddi_encode_vp9_specific.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,7 @@ VAStatus DdiEncodeVp9::ContextInitialize(CodechalSetting *codecHalSettings)
390390
// Allocate segment params
391391
m_segParams = (CODEC_VP9_ENCODE_SEGMENT_PARAMS *)MOS_AllocAndZeroMemory(sizeof(CODEC_VP9_ENCODE_SEGMENT_PARAMS) * 8);
392392
DDI_CODEC_CHK_NULL(m_segParams, "nullptr m_segParams.", VA_STATUS_ERROR_ALLOCATION_FAILED);
393+
m_encodeCtx->pVpxSegParams = (void*)m_segParams;
393394

394395
// Allocate coded buffer status
395396
m_codedBufStatus = (VACodedBufferVP9Status *)MOS_AllocAndZeroMemory(DDI_ENCODE_MAX_STATUS_REPORT_BUFFER * sizeof(VACodedBufferVP9Status));

0 commit comments

Comments
 (0)