Support arbitrary video resolutions in av_test

This commit is contained in:
Mikhael-Danilov 2016-11-10 14:05:46 -05:00
parent 8bbde23f48
commit 06ad5613bc

View File

@ -358,7 +358,7 @@ static void *iterate_toxav(void *data)
static int send_opencv_img(ToxAV *av, uint32_t friend_number, const IplImage *img)
{
int32_t strides[3] = { 1280, 640, 640 };
int32_t strides[3] = { img->width, img->width / 2, img->width / 2 };
uint8_t *planes[3] = {
(uint8_t *)malloc(img->height * img->width),
(uint8_t *)malloc(img->height * img->width / 4),