msdk: make sure the found response meets the request

Otherwise the re-used msdk response doesn't have enough frames so it is
possible the pipeline will be broken
This commit is contained in:
Haihao Xiang 2020-01-03 15:27:30 +08:00 committed by GStreamer Merge Bot
parent f578eab6fd
commit d6fbec5a44

View file

@ -357,7 +357,8 @@ _find_request (gconstpointer resp, gconstpointer req)
/* Confirm if it's under the size of the cached response */
if (_req->Info.Width <= cached_resp->request.Info.Width &&
_req->Info.Height <= cached_resp->request.Info.Height) {
_req->Info.Height <= cached_resp->request.Info.Height &&
_req->NumFrameSuggested <= cached_resp->request.NumFrameSuggested) {
return _req->Type & cached_resp->
request.Type & MFX_MEMTYPE_FROM_DECODE ? 0 : -1;
}