Skip to content

Commit

Permalink
Fix missing cast to void* in %p format
Browse files Browse the repository at this point in the history
POSIX says %p argument must be pointer to void. Newer libfmt seems to
have an issue with arbitary pointers, even failing at compile time, so
make sure the cast is there (fmt::ptr casts to void*).
  • Loading branch information
yol committed Apr 16, 2020
1 parent 75b3109 commit 5e84b6e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions xbmc/cores/VideoPlayer/DVDCodecs/Video/AddonVideoCodec.cpp
Expand Up @@ -260,8 +260,14 @@ CDVDVideoCodec::VCReturn CAddonVideoCodec::GetPicture(VideoPicture* pVideoPictur
}
}

CLog::Log(LOGDEBUG, LOGVIDEO, "CAddonVideoCodec: GetPicture::VC_PICTURE with pts %llu %dx%d (%dx%d) %f %p:%d offset:%d,%d,%d, stride:%d,%d,%d", picture.pts, pVideoPicture->iWidth, pVideoPicture->iHeight, pVideoPicture->iDisplayWidth, pVideoPicture->iDisplayHeight, m_displayAspect,
picture.decodedData, picture.decodedDataSize, picture.planeOffsets[0], picture.planeOffsets[1], picture.planeOffsets[2], picture.stride[0], picture.stride[1], picture.stride[2]);
CLog::Log(LOGDEBUG, LOGVIDEO,
"CAddonVideoCodec: GetPicture::VC_PICTURE with pts {} {}x{} ({}x{}) {} {}:{} "
"offset:{},{},{}, stride:{},{},{}",
picture.pts, pVideoPicture->iWidth, pVideoPicture->iHeight,
pVideoPicture->iDisplayWidth, pVideoPicture->iDisplayHeight, m_displayAspect,
fmt::ptr(picture.decodedData), picture.decodedDataSize,
picture.planeOffsets[0], picture.planeOffsets[1], picture.planeOffsets[2],
picture.stride[0], picture.stride[1], picture.stride[2]);

if (picture.width != m_width || picture.height != m_height)
{
Expand Down

0 comments on commit 5e84b6e

Please sign in to comment.