libs: encoder: ensure profile when context initialization

We can't be sure that encoder's profile is assgined already or not
at context initialization.

https://bugzilla.gnome.org/show_bug.cgi?id=779120
This commit is contained in:
Hyunjun Ko 2017-02-23 15:16:06 +09:00 committed by Víctor Manuel Jáquez Leal
parent 04a844ced0
commit 6468bf2ddf

View file

@ -596,7 +596,7 @@ init_context_info (GstVaapiEncoder * encoder)
GST_VAAPI_ENCODER_GET_CLASS (encoder)->class_data;
cip->usage = GST_VAAPI_CONTEXT_USAGE_ENCODE;
cip->profile = encoder->profile;
cip->profile = get_profile (encoder);
if (cdata->codec == GST_VAAPI_CODEC_JPEG) {
cip->entrypoint = GST_VAAPI_ENTRYPOINT_PICTURE_ENCODE;
} else {