decoder: h264: fix detection of profile changes for MVC.

If the VA driver exposes ad-hoc H.264 MVC profiles, then we have to
be careful to detect profiles changes and not reset the underlying
VA context erroneously. In MVC situations, we could indeed get a
profile_idc change for every SPS that gets activated, alternatively
(base-view -> non-base view -> base-view, etc.).

An improved fix would be to characterize the exact profile to use
once and for all when SPS NAL units are parsed. This would also
allow for fallbacks to a base-view decoding only mode.
This commit is contained in:
Gwenole Beauchesne 2014-06-04 19:03:18 +02:00
parent 885ebf4c72
commit f36486a1e2

View file

@ -1270,7 +1270,7 @@ ensure_context(GstVaapiDecoderH264 *decoder, GstH264SPS *sps)
return GST_VAAPI_DECODER_STATUS_ERROR_UNSUPPORTED_PROFILE;
}
if (priv->profile != profile) {
if (!priv->profile || (priv->profile != profile && priv->max_views == 1)) {
GST_DEBUG("profile changed");
reset_context = TRUE;
priv->profile = profile;