]> git.sesse.net Git - ffmpeg/commitdiff
lavu/qsv: allow surface size larger than requirement
authorZhong Li <zhong.li@intel.com>
Fri, 8 Mar 2019 06:41:22 +0000 (14:41 +0800)
committerZhong Li <zhong.li@intel.com>
Sun, 17 Mar 2019 23:06:41 +0000 (07:06 +0800)
Just like commit 6829a079444e10818a847e153121fb458cc5c0a8,
surface size larger than requirement should not be treated as error.

Signed-off-by: Zhong Li <zhong.li@intel.com>
libavutil/hwcontext_qsv.c

index 814ce215cea2616d9c7169c77ceb033b9819c0cc..b6d8bfe2bfbaaf60aa7b200a6e9e8b2640344fe8 100644 (file)
@@ -389,7 +389,7 @@ static mfxStatus frame_alloc(mfxHDL pthis, mfxFrameAllocRequest *req,
         !(req->Type & (MFX_MEMTYPE_FROM_VPPIN | MFX_MEMTYPE_FROM_VPPOUT)) ||
         !(req->Type & MFX_MEMTYPE_EXTERNAL_FRAME))
         return MFX_ERR_UNSUPPORTED;
-    if (i->Width  != i1->Width || i->Height != i1->Height ||
+    if (i->Width  > i1->Width || i->Height > i1->Height ||
         i->FourCC != i1->FourCC || i->ChromaFormat != i1->ChromaFormat) {
         av_log(ctx, AV_LOG_ERROR, "Mismatching surface properties in an "
                "allocation request: %dx%d %d %d vs %dx%d %d %d\n",