I am using UMediaPlayer::OpenUrl(url) to load videos in a video Player I created but switching between video of varying resolution say one video is 1280x720 other is 1280x600 application crashes
//Code use to create media player and add its video as a texture to a dynamci material
m_mediaPlayer = static_cast(StaticConstructObject(UMediaPlayer::StaticClass()));
m_mediaPlayer->SetLooping(true);
//add mediaplayer to media texture
m_mediaTexture = static_cast<UMediaTexture*>(StaticConstructObject(UMediaTexture::StaticClass()));
m_mediaTexture->SetMediaPlayer(m_mediaPlayer);
//add media texture to mesh
UStaticMeshComponent * mesh = m_videoFrame->StaticMeshComponent;
UMaterialInstanceDynamic * material = mesh->CreateDynamicMaterialInstance(0);
material->SetTextureParameterValue("Video", m_mediaTexture);
mesh->SetMaterial(0, material);
//I call this whenever I need video to be changed
m_mediaPlayer->OpenUrl(url);
m_mediaPlayer->Rewind();
m_mediaPlayer->Play();
JewellerySC_client.exe!FMediaTextureResource::UpdateDeferredResource(FRHICommandListImmediate & RHICmdList, bool bClearRenderTarget) Line 102 C++
JewellerySC_client.exe!FDeferredUpdateResource::UpdateResources(FRHICommandListImmediate & RHICmdList) Line 127 C++
JewellerySC_client.exe!RenderViewFamily_RenderThread(FRHICommandListImmediate & RHICmdList, FSceneRenderer * SceneRenderer) Line 983 C++
JewellerySC_client.exe!TGraphTask<FRendererModule::BeginRenderingViewFamily'::11’::EURCMacro_FDrawSceneCommand>::ExecuteTask(TArray<FBaseGraphTask *,FDefaultAllocator> & NewTasks, ENamedThreads::Type CurrentThread) Line 665 C++
JewellerySC_client.exe!FTaskThread::ProcessTasks(int QueueIndex, bool bAllowStall) Line 338 C++
JewellerySC_client.exe!FTaskThread::ProcessTasksUntilQuit(int QueueIndex) Line 177 C++
JewellerySC_client.exe!RenderingThreadMain(FEvent * TaskGraphBoundSyncEvent) Line 268 C++
JewellerySC_client.exe!FRenderingThread::Run() Line 387 C++
JewellerySC_client.exe!FRunnableThreadWin::Run() Line 73 C++
JewellerySC_client.exe!FRunnableThreadWin::GuardedRun() Line 48 C++
[External Code]
Are you still experiencing this crash? If so could you include log files from crash as well? Looking at them will give an idea of where in code crash is occurring. Logs folder is inside Project Folder → Saved folder.
Sorry for such a late reply. We didn’t have problem afterwards.But I went back to check with video I was using to test this issue and it seems to be a problem with that particular format or something. I have attached to videos if you want to test it. crash happens when switching from .wmv to .mp4 then back to .wmv .
[1]: 39085-movies. (3.54 MB)
We’ve not heard from you in a few days. If you’re still having any issues related to this post then feel free to post a comment responding to 's question.