[Multimedia] Fix rotation issue for portrait mode (#5766)