Skip to content

Commit

Permalink
VideoBuffers: Use YuvImage::MAX_PLANES
Browse files Browse the repository at this point in the history
  • Loading branch information
popcornmix committed Jun 17, 2017
1 parent f2c5590 commit 35fa830
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoPPFFmpeg.cpp
Expand Up @@ -128,8 +128,8 @@ bool CDVDVideoPPFFmpeg::Process(VideoPicture* pPicture)
int pict_type = (m_pSource->qscale_type != DVP_QSCALE_MPEG1) ?
PP_PICT_TYPE_QP2 : 0;

uint8_t* srcPlanes[3], *dstPlanes[3];
int srcStrides[3], dstStrides[3];
uint8_t* srcPlanes[YuvImage::MAX_PLANES], *dstPlanes[YuvImage::MAX_PLANES];
int srcStrides[YuvImage::MAX_PLANES], dstStrides[YuvImage::MAX_PLANES];
m_pSource->videoBuffer->GetPlanes(srcPlanes);
m_pSource->videoBuffer->GetStrides(srcStrides);
m_pTarget.videoBuffer->GetPlanes(dstPlanes);
Expand Down
4 changes: 2 additions & 2 deletions xbmc/cores/VideoPlayer/DVDFileInfo.cpp
Expand Up @@ -269,8 +269,8 @@ bool CDVDFileInfo::ExtractThumb(const std::string &strPath,

if (context)
{
uint8_t *planes[3];
int stride[3];
uint8_t *planes[YuvImage::MAX_PLANES];
int stride[YuvImage::MAX_PLANES];
picture.videoBuffer->GetPlanes(planes);
picture.videoBuffer->GetStrides(stride);
uint8_t *src[4]= { planes[0], planes[1], planes[2], 0 };
Expand Down

0 comments on commit 35fa830

Please sign in to comment.