emotion vlc module - fix potential divide by 0
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>
Fri, 8 Jul 2016 10:12:41 +0000 (19:12 +0900)
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>
Fri, 8 Jul 2016 10:12:41 +0000 (19:12 +0900)
fix CID 1357146

src/modules/emotion/libvlc/emotion_libvlc.c

index 3c73451..c029edf 100644 (file)
@@ -711,7 +711,8 @@ em_fps_get(void *video)
    int num = 0, den = 0;
 
    em_fps_num_den_get(video, &num, &den);
-   return num / (double)den;
+   if (den > 0) return num / (double)den;
+   return 0.0;
 }
 
 static void