context: reset VA context if VA surfaces set changed.

It is a requirement from VA-API specification that the VA context got
from vaCreateContext(), for decoding purposes, binds the supplied set
of VA surfaces. This means that if the set of VA surfaces is to be
changed for the current decode session, then the VA context needs to
be recreated with the new set of VA surfaces.
This commit is contained in:
Gwenole Beauchesne 2014-05-03 15:47:53 +02:00
parent c12d80eb88
commit 906a561c26

View file

@ -399,6 +399,9 @@ gst_vaapi_context_reset (GstVaapiContext * context,
} else if (new_cip->usage == GST_VAAPI_CONTEXT_USAGE_ENCODE) {
if (context_update_config_encoder (context, &new_cip->config.encoder))
reset_config = TRUE;
} else if (new_cip->usage == GST_VAAPI_CONTEXT_USAGE_DECODE) {
if (reset_surfaces)
reset_config = TRUE;
}
if (reset_surfaces)