Skip to content
This repository has been archived by the owner on Nov 26, 2022. It is now read-only.

Commit

Permalink
Fix assignment of "num_planes" in vaapi allocator
Browse files Browse the repository at this point in the history
Usually there are 2 planes for NV12 buffers during decoding, but
during encoding the RGBA source buffer has only a single plane.
Assign info.numOfPlanes instead to set the correct plane count.

Change-Id: I491268b39c0376645f643a27803a983e6511a043
  • Loading branch information
stephan-gh committed Apr 13, 2019
1 parent 9d8e6f1 commit 68c4e95
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion omx_utils/src/mfx_omx_vaapi_allocator.cpp
Expand Up @@ -517,7 +517,7 @@ mfxStatus MfxOmxVaapiFrameAllocator::CreateSurfaceFromGralloc(const mfxU8* handl
surfExtBuf.width = width;
surfExtBuf.height = height;
surfExtBuf.pitches[0] = info.pitch;
surfExtBuf.num_planes = 2;
surfExtBuf.num_planes = info.numOfPlanes;
surfExtBuf.num_buffers = 1;
#ifdef MFX_OMX_USE_PRIME
surfExtBuf.buffers = (uintptr_t *)&(info.prime);
Expand Down

0 comments on commit 68c4e95

Please sign in to comment.