Invalid IVideoRenderElement pointer in event method onRenderDataTypeChanged

In your sample code, the following method is called with an invalid IVideoRenderElement pointer:
File: custom_ui_mgr.cpp line 95
Original code:

void CCustomizeInMeetingUIMgr::onRenderDataTypeChanged(ZOOM_SDK_NAMESPACE::IVideoRenderElement* pElement, ZOOM_SDK_NAMESPACE::VideoRenderDataType dataType)
{
}

My code for testing:

Void CustomizeInMeetingUIMgr::onRenderDataTypeChanged(ZOOM_SDK_NAMESPACE::IVideoRenderElement* pElement, ZOOM_SDK_NAMESPACE::VideoRenderDataType dataType)
{
   ZOOM_SDK_NAMESPACE::VideoRenderElementType eType;
   eType = pElement->GetType();
}

Must be the IVideoRenderElement* ignored If the datatype is VideoRenderData_None? Because it’s unintialized! If so, I would expect a nullptr for the pElement;

Hey @Weisheit,

Thanks for using the dev forum!

Is this in the latest version of the SDK?

Thanks!
Michael

It can be reproduced with all SDK versions. From 5,5 till 5.7.1.644.

Hey @Weisheit,

Awesome, thank you for providing that. So the issue is that onRenderDataTypeChanged always returns an invalid pointer to IVideoRenderElement?

Thanks!
Michael

You can reproduce it in your sample code. If you join a meeting, the preview video element will be destroyed. After that, the function above is called and the IVideorenderElement is invalid. If you call the GetType method, the app will crash. Since the dataType parameter is VideoRenderData_None, I don’t know if this is correct or a bug. If it’s correct, I expect the IVideorenderElement to be a null pointer. Simply run your own sample code and insert the GetType call above to check it out.

Hey @Weisheit,

I have reproduced this issue. Will submit a bug report for this. Stay tuned.

Thanks!
Michael

Hey @Weisheit,

We have identified the root cause of this issue and plan to have a fix for it in the next major release.

Thanks!
Michael