va: Fix H264 profile decision logic

The current logic would choose 'baseline' profiles only in case that
these profiles appear in the list first.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8882>
This commit is contained in:
Jochen Henneberg 2025-04-24 07:48:12 +02:00
parent 068385e83f
commit 67cafe5999

View File

@ -1417,9 +1417,9 @@ _decide_profile (GstVaH264Enc * self, VAProfile * _profile, guint * _rt_format)
continue;
}
/* baseline only support I/P mode. */
if (self->gop.num_bframes > 0) {
if (g_strstr_len (profile_name, -1, "baseline"))
/* baseline only support I/P mode and neither cabac nor dct8x8. */
if (!self->use_dct8x8 && !self->use_cabac && self->gop.num_bframes == 0) {
if (!g_strstr_len (profile_name, -1, "baseline"))
continue;
}