forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-04 1543e317f1da31b75942316931e8f491a8920811
kernel/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c
....@@ -729,6 +729,8 @@
729729 return -EINVAL;
730730
731731 if (*nplanes) {
732
+ if (*nplanes != q_data->fmt->num_planes)
733
+ return -EINVAL;
732734 for (i = 0; i < *nplanes; i++)
733735 if (sizes[i] < q_data->sizeimage[i])
734736 return -EINVAL;