diff options
Diffstat (limited to '')
-rw-r--r-- | src/lib/emotion/emotion_smart.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/lib/emotion/emotion_smart.c b/src/lib/emotion/emotion_smart.c index 16a6677414..52ae0e6d06 100644 --- a/src/lib/emotion/emotion_smart.c +++ b/src/lib/emotion/emotion_smart.c | |||
@@ -476,10 +476,20 @@ _efl_canvas_video_aspect_border_apply(Evas_Object *obj, Efl_Canvas_Video_Data *s | |||
476 | 476 | ||
477 | int aspect_opt = 0; | 477 | int aspect_opt = 0; |
478 | 478 | ||
479 | iw = sd->video.w; | 479 | /* Prefer (if available) the video aspect ratio to calculate the sizes */ |
480 | ih = sd->video.h; | 480 | if (sd->ratio > 0.0) |
481 | { | ||
482 | ir = sd->ratio; | ||
483 | ih = sd->video.h; | ||
484 | iw = (double)ih * ir; | ||
485 | } | ||
486 | else | ||
487 | { | ||
488 | iw = sd->video.w; | ||
489 | ih = sd->video.h; | ||
490 | ir = (double)iw / ih; | ||
491 | } | ||
481 | 492 | ||
482 | ir = (double)iw / ih; | ||
483 | r = (double)w / h; | 493 | r = (double)w / h; |
484 | 494 | ||
485 | /* First check if we should fit the width or height of the video inside the | 495 | /* First check if we should fit the width or height of the video inside the |