diff --git a/src/switch_core_video.c b/src/switch_core_video.c index 76232b40f0..e486a22702 100644 --- a/src/switch_core_video.c +++ b/src/switch_core_video.c @@ -579,7 +579,7 @@ SWITCH_DECLARE(void) switch_img_copy(switch_image_t *img, switch_image_t **new_i if (*new_img) { new_fmt = (*new_img)->fmt; - if ((*new_img)->fmt != SWITCH_IMG_FMT_I420 && (*new_img)->fmt != SWITCH_IMG_FMT_ARGB) return; + if ((*new_img)->fmt != SWITCH_IMG_FMT_I420 && (*new_img)->fmt != SWITCH_IMG_FMT_ARGB && (*new_img)->fmt != SWITCH_IMG_FMT_ARGB_LE) return; if (img->d_w != (*new_img)->d_w || img->d_h != (*new_img)->d_h ) { new_fmt = (*new_img)->fmt; switch_img_free(new_img); @@ -607,6 +607,12 @@ SWITCH_DECLARE(void) switch_img_copy(switch_image_t *img, switch_image_t **new_i img->planes[SWITCH_PLANE_V], img->stride[SWITCH_PLANE_V], (*new_img)->planes[SWITCH_PLANE_PACKED], (*new_img)->stride[SWITCH_PLANE_PACKED], img->d_w, img->d_h); + } else if (new_fmt == SWITCH_IMG_FMT_ARGB_LE) { + I420ToABGR(img->planes[SWITCH_PLANE_Y], img->stride[SWITCH_PLANE_Y], + img->planes[SWITCH_PLANE_U], img->stride[SWITCH_PLANE_U], + img->planes[SWITCH_PLANE_V], img->stride[SWITCH_PLANE_V], + (*new_img)->planes[SWITCH_PLANE_PACKED], (*new_img)->stride[SWITCH_PLANE_PACKED], + img->d_w, img->d_h); } } else if (img->fmt == SWITCH_IMG_FMT_ARGB) { if (new_fmt == SWITCH_IMG_FMT_ARGB) {