FS-7513: WIP CONF STUFF

This commit is contained in:
Anthony Minessale authored and Michael Jerris committed 2015-05-28 12:46:55 -05:00
1 parent d6ef34a725
commit 387cbc9dda
3 files changed
+585 -6

No files matched your search

+7 -3
View File
@@ -76,11 +76,15 @@ SWITCH_DECLARE(void) switch_img_free(switch_image_t **img)
SWITCH_DECLARE(void) switch_img_copy(switch_image_t *img, switch_image_t **new_img)
{
switch_assert(img);
switch_assert(new_img);
if (!img->fmt == SWITCH_IMG_FMT_I420) return;
if (img->d_w != (*new_img)->d_w || img->d_h != (*new_img)->d_w) {
vpx_img_free((vpx_image_t *)*new_img);
if (*new_img != NULL) {
if (img->d_w != (*new_img)->d_w || img->d_h != (*new_img)->d_w) {
switch_img_free(new_img);
}
}
if (*new_img == NULL) {
@@ -88,7 +92,7 @@ SWITCH_DECLARE(void) switch_img_copy(switch_image_t *img, switch_image_t **new_i
}
switch_assert(*new_img);
memcpy((*new_img)->img_data, img->img_data, img->d_w * img->d_h * 3 / 2);
memcpy((*new_img)->img_data, img->img_data, (img->d_w * img->d_h * 3) / 2);
}
/* For Emacs: