Update texture for a background Layer

I am using a Layer to display 2D background on my scene. My app receives a background texture very quickly (like a video, but with a lower frame rate and each frame is a JPG), so I would have to dispose the previous texture and create a new texture for every set interval.

Is there a more optimized way to ‘swap’ textures? Like overwriting the internalTexture without having to release the memory.

You could draw the images on a DynamicTexture