Skip to content
This repository was archived by the owner on Aug 5, 2022. It is now read-only.

vp9hdec: fix pCurrFrame->pMdfSurface NULL pointer issue #32

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/vp9hdec/decode_hybrid_vp9.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3289,9 +3289,16 @@ VAStatus Intel_HybridVp9Decode_HostVldRenderCb (

// Reset padding flag of current frame and update surface dimension
surface = SURFACE(pMdfDecodeFrame->ucCurrIndex);
if ((surface == NULL) || (surface->private_data == NULL))
return VA_STATUS_ERROR_INVALID_PARAMETER;

pFrameSource = (INTEL_DECODE_HYBRID_VP9_MDF_FRAME_SOURCE *)(surface->private_data);
pCurrFrame = &(pFrameSource->Frame);
pFrameSource->bHasPadding = false;

if (pCurrFrame->pMdfSurface == NULL)
return VA_STATUS_ERROR_INVALID_PARAMETER;

pCurrFrame->pMdfSurface->SetSurfaceStateDimensions(
pMdfDecodeFrame->dwWidth,
pMdfDecodeFrame->dwHeight);
Expand Down