}
{
dst->data_cb = (unsigned char *)malloc(dst->h1 * dstride1);
- memcpy(dst->data_cb, img->data_cb, dst->h0 * dstride0);
+ memcpy(dst->data_cb, img->data_cb, dst->h1 * dstride1);
}
{
- dst->data_cr = (unsigned char *)malloc(dst->h1 * dstride1);
- memcpy(dst->data_cr, img->data_cr, dst->h0 * dstride0);
+ dst->data_cr = (unsigned char *)malloc(dst->h2 * dstride2);
+ memcpy(dst->data_cr, img->data_cr, dst->h2 * dstride2);
}
return dst;