fix(decklink-bridge): use GetFrameInternalBufferBytes instead of GetBytes
This commit is contained in:
parent
a5aed86349
commit
74055e79f8
1 changed files with 3 additions and 1 deletions
|
|
@ -271,7 +271,9 @@ public:
|
||||||
/* Some SDK versions require casting to the base IDeckLinkVideoFrame
|
/* Some SDK versions require casting to the base IDeckLinkVideoFrame
|
||||||
* to access GetBytes() from an IDeckLinkVideoInputFrame. */
|
* to access GetBytes() from an IDeckLinkVideoInputFrame. */
|
||||||
IDeckLinkVideoFrame *baseFrame = static_cast<IDeckLinkVideoFrame *>(videoFrame);
|
IDeckLinkVideoFrame *baseFrame = static_cast<IDeckLinkVideoFrame *>(videoFrame);
|
||||||
baseFrame->GetBytes(&bytes);
|
// SDK has changed: GetBytes() is no longer directly on IDeckLinkVideoFrame.
|
||||||
|
// Use GetFrameInternalBufferBytes() which is more robust.
|
||||||
|
videoFrame->GetFrameInternalBufferBytes(&bytes);
|
||||||
uint32_t sz = (uint32_t)(videoFrame->GetRowBytes() * videoFrame->GetHeight());
|
uint32_t sz = (uint32_t)(videoFrame->GetRowBytes() * videoFrame->GetHeight());
|
||||||
|
|
||||||
uint32_t frame_bytes_expected = (uint32_t)m_ds->width * (uint32_t)m_ds->height * 2;
|
uint32_t frame_bytes_expected = (uint32_t)m_ds->width * (uint32_t)m_ds->height * 2;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue