mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-09-20 13:08:50 +02:00
decklink: Avoid sending 0x0 frame to libobs
When the mode is set to auto, the API sometimes send frames with 0x0 size. Without filtering such frames, which causes libobs to output error messages.
This commit is contained in:
parent
76660517d2
commit
8a41c7298f
@ -187,6 +187,9 @@ void DeckLinkDeviceInstance::HandleVideoFrame(
|
|||||||
currentFrame.height = (uint32_t)frame->GetHeight();
|
currentFrame.height = (uint32_t)frame->GetHeight();
|
||||||
currentFrame.timestamp = timestamp;
|
currentFrame.timestamp = timestamp;
|
||||||
|
|
||||||
|
if (currentFrame.width == 0 || currentFrame.height == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
obs_source_output_video2(
|
obs_source_output_video2(
|
||||||
static_cast<DeckLinkInput *>(decklink)->GetSource(),
|
static_cast<DeckLinkInput *>(decklink)->GetSource(),
|
||||||
¤tFrame);
|
¤tFrame);
|
||||||
|
Loading…
Reference in New Issue
Block a user