Missing video width/height on subscriptionStart
From time to time, tvheadend doesn't send any width/height in the subscriptionStart message. This causes XBMC to attempt to open a hardware decoder surface with 0x0 dimensions which can crash VAAPI completely. I reported it in https://github.com/FernetMenta/xbmc/issues/246 but I guess the real fix would be to figure out why tvheadend doesn't always have the dimensions ready.
Would be great to be able to fix this since it's currently causing my HTPC to crash from time to time when switching channels.
I'll gladly test any patches!
Updated by Sam Stenvall almost 7 years ago
After some digging through the code with extra logging enabled I have determined that when parser_set_stream_vparam() is called, the elementary stream's dimensions may be zero, but at the end of the function the values are always correctly updated. This means that the parser itself (the MPEG-2 and the H.264 parser respectively) works correctly in that they are able to determine the correct values. The problem seems to be that the subscription is started and the video stream details are sent in subscriptionStart before the first packets have been processed, which means from time to time (1 every 20 times roughly) the stream details are missing.
@perexg @adamsutton do you have any ideas on how to fix it?
Looking at my configuration files, all services have their dimensions parsed and stored, I don't know why those values are used instead of 0x0.