MFXVideoENCODE_EncodeFrameAsync is returning MFX_ERR_NOT_ENOUGH_BUFFER. But querying video parameters using following code returns the same size again as was returned by MFXVideoENCODE_Init.
mfxStatus status;
mfxVideoParam param;
memset(¶m, 0, sizeof(mfxVideoParam));
status = MFXVideoENCODE_GetVideoParam(priv->session, ¶m);
if (status != MFX_ERR_NONE)
{
return;
}
printf("new size = %d\n", param.mfx.BufferSizeInKB) --> This returns the same size as was returned after init of encoder.
and hence call to MFXVideoENCODE_EncodeFrameAsync is always failing after few frames when this happens.
I am using version 1.16