Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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?

Please advise.

Thanks, Jason

Product Version: UE 4.9
more ▼

asked Sep 19 '15 at 12:22 AM in Bug Reports

avatar image

205 12 20 44

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

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?

more ▼

answered Sep 21 '15 at 07:21 PM

avatar image JasonKng Sep 21 '15 at 08:49 PM

I was using a custom IMediaPlayer originally based on the WMF player version. I was however not using the OnTracksChanged system. I added the broadcast of that event on the Open of my media and was able to get everything up and running. Thanks!

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question