On Fri Sep 6 18:12:56 2024 +0000, Elizabeth Figura wrote:
Ah, right, this is what I was alluding to with 5667. The preferred_format *should* be only set when we first get it; it's a bug that it's not.
I found that you said this in !5667:
The point of the "preferred" format is that it should be the one that does not require videoconvert, and therefore offers the best latency.
If that's true, we should not use preferred_format in stream_props_GetMediaType() for uncompressed situation, because "the one that does not require videoconvert" may differ from the actual output format.
In front side, games will use the result of stream_props_GetMediaType() to create d3d textures, if we get a bpp which is different from the actual output, there will be buffer overflow. So I think this patch is doing the right thing.