[channels,warnings] properly handle function return

This commit is contained in:
Armin Novak
2026-02-16 08:16:58 +01:00
parent e0e6a7f800
commit bf99266c2e
16 changed files with 115 additions and 41 deletions

View File

@@ -716,8 +716,9 @@ static void video_timer(VideoClientContext* video, UINT64 now)
memcpy(presentation->surface->data, frame->surfaceData, 1ull * frame->scanline * frame->h);
WINPR_ASSERT(video->showSurface);
video->showSurface(video, presentation->surface, presentation->ScaledWidth,
presentation->ScaledHeight);
if (!video->showSurface(video, presentation->surface, presentation->ScaledWidth,
presentation->ScaledHeight))
WLog_WARN(TAG, "showSurface failed");
VideoFrame_free(&frame);
}
@@ -872,8 +873,9 @@ static UINT video_VideoData(VideoClientContext* context, const TSMM_VIDEO_DATA*
return CHANNEL_RC_OK;
WINPR_ASSERT(context->showSurface);
context->showSurface(context, presentation->surface, presentation->ScaledWidth,
presentation->ScaledHeight);
if (!context->showSurface(context, presentation->surface, presentation->ScaledWidth,
presentation->ScaledHeight))
return CHANNEL_RC_NOT_INITIALIZED;
priv->publishedFrames++;