UMediaTexture being initialized before it's referenced UMediaPlayer has been initialized
I just upgraded to UE 4.9 and discovered that my UMediaTexture is now being initialized before it's referenced UMediaPlayer has a chance to initialize.
I have a simple scene that has a connected UMediaTexture attached to a box face. If I run immediately after loading, my UMediaTexture fails to render the images from my UMediaPlayer. If I then modify the UMediaTexture in any way (without touching the reference link to the UMediaPlayer), it gets a call to PostEditChangeProperty which then calls InitializeTrack which then properly AddSink back to the UMediaPlayer's VideoTracks and all is well - until, of course, I reopen the level.
I debugged and discovered that the UMediaTexture::PostLoad call was occurring before its UMediaPlayer referenced by the UMediaTexture::MediaPlayer was getting it's PostLoad call - why would we ever want this to occur? So we have a serious bug in the loading system of the Media Framework based UAssets.
The UMediaTexture's InitializeTrack needs to be called after its UMediaPlayer's InitializePlayer has been called. How do I get that to occur?
asked Sep 19 '15 at 12:22 AM in Bug Reports
Hey Jason, I'm gonna need some more information from you to track this down.
In general, the loading order shouldn't matter. If the texture is loaded after the player, then the Texture's InitializeTrack() method will have access to an initialized player. If, on the other hand, the player is loaded after the texture, then it should call its OnTracksChanged delegate, which is caught by the texture to initialize itself. Either way, the texture should be initialized with a valid player.
Can you check whether the UMediaPlayer::HandlePlayerTracksChanged() and UMediaTexture::HandleMediaPlayerTracksChanged() are called in your case?
answered Sep 21 '15 at 07:21 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here