]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-7500: fix seg
authorSeven Du <dujinfang@gmail.com>
Sun, 15 Feb 2015 00:15:36 +0000 (08:15 +0800)
committerMichael Jerris <mike@jerris.com>
Thu, 28 May 2015 17:47:02 +0000 (12:47 -0500)
src/switch_core_video.c

index 068ef1ee2defb2a08bb9ae11bd6a9cfb23a7f7fc..5a556451cd785790c1feeeabfa0716b19989a064 100644 (file)
@@ -1072,14 +1072,13 @@ SWITCH_DECLARE(switch_status_t) switch_img_fit(switch_image_t **srcP, int width,
        switch_assert(srcP);
        switch_assert(width && height);
 
-       img_aspect = (double) src->d_w / src->d_h;
-
        src = *srcP;
 
        if (!src || (src->d_w <= width && src->d_h <= height)) {
                return SWITCH_STATUS_SUCCESS;
        }
 
+       img_aspect = (double) src->d_w / src->d_h;
        new_w = src->d_w;
        new_h = src->d_h;