using the --no-videotoolbox option does not change anything in the playback behaviour.
I will prepare a dump/recording of a stream where I can see the issue often. Maybe its a problem of the stream (FTA, Tele5 PAL).
I am currently uploading File "TVVLCKit_180_2.ts" via the file uploader.
The stream is a dump of "Tele 5" today, partial Star Trek DS9 with advertisement blocks in SD resolution (PAL 576i).
Playback is done in my App using TVVLCKit in Full Screen. VLC seems to playback the stream correctly.
The stream starts with 4:3 ratio. At 1:45 an ad block is starting, switching to 16:9. TVVLCKit is showing this part as 4:3 as well. At 9:38 it switches back to 4:3. This repeats with every advertisement block. The dump then ends with the beginning of Star Trek Enterprise, which is 16:9 but still shown as 4:3.
It looks to me, like 16:9 is recognized correctly, switches to 4:3 are also recognized correctly and displayed aspect is changed. But when the stream switches back to 16:9 the display stays at 4:3.
In VLC it works correctly. I have just seen, that 4:3 was displayed in original size while 16:9 was displayed in windowed full screen until I set display size to original size (CMD-1) as well. Looks like the scaling is stored (and used) independently for each aspect ratio. I may have used Full-Screen of 16:9 PAL streams from a previous session.
I have a second dump, which is longer and starts with an advertisement block in 16:9. It is about twice the size. If you need it, let me know, but I guess the file you now received should be good enough.
This might be related to the fact, that [mediaPlayer setVideoAspectRatio:"16:9"] does not work correctly. I can set vAR to 4:3 but I can't set it back to 16:9 or NULL - once it is set to 4:3 it stays 4:3.
When this fails when done programmatically using setVideAspectRatio: then it is very likely, that it also fails, when the vAR of the stream changes.
When doing it programmatically I was able to grab the debug log in Xcode and there is saw (with a 16:9 stream):
So it looks like the event arrives at vout, but vout does not perform the right adjustments.
I will also post in the forum about this finding, as it seems to be a bug in libvlc, not in VLCKit.
In most cases the View will then be set back to 1920x1080 from tvOS to comply to the view constraints.
Then at least in some cases the aspect setting works partially.
On top - when I fix the vAR to 16:9 while a 16:9 stream is playing, then switched to 4:3 and back to 16:9 are then done as expected.
It looks like the issue has been fixed in nightly builds since a while (see #276 (closed)).
I will continue to investigate the issue and close this one, when done.