summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2018-06-07 12:50:33 +0200
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2018-06-07 12:50:33 +0200
commitdbe30f3459b98d6136f7cfdbd0a226f81e76e429 (patch)
tree89ea897e7115aeb5902f7aaf048f8e9de1ddecea
parent44739b2194dd6645cf37217b90da62d936b33bd8 (diff)
vaapiencode: h264: set best profile in the intersected caps
The previous behavior when selecting a profile was to select the best one in the intersection of allowed, in the pipelne, and available (by the hardware). This was changed in commit 1f1e9ee to choose the first one at fixate. Nonetheless, it's a bad idea change the behavior on a stable release. Thus, this patch selects the best profile in the intersected caps as before.
-rw-r--r--gst/vaapi/gstvaapiencode_h264.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/gst/vaapi/gstvaapiencode_h264.c b/gst/vaapi/gstvaapiencode_h264.c
index 85a49235..81619a17 100644
--- a/gst/vaapi/gstvaapiencode_h264.c
+++ b/gst/vaapi/gstvaapiencode_h264.c
@@ -327,18 +327,9 @@ gst_vaapiencode_h264_set_config (GstVaapiEncode * base_encode)
} else {
GstCaps *profile_caps;
- const gchar *profile_str;
profile_caps = gst_caps_intersect (allowed_caps, available_caps);
-
- /* let's fixate to adjust to minimal profile */
- profile_caps = gst_caps_fixate (profile_caps);
-
- structure = gst_caps_get_structure (profile_caps, 0);
- profile_str = gst_structure_get_string (structure, "profile");
- if (profile_str)
- profile = gst_vaapi_utils_h264_get_profile_from_string (profile_str);
-
+ profile = find_best_profile (profile_caps);
gst_caps_unref (profile_caps);
}