summaryrefslogtreecommitdiff
path: root/src/modules/ethumb
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-08-27 17:10:02 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-08-27 17:10:02 +0900
commit61b5a4e40b6eb98dd1738c6aad0eb0072f951c52 (patch)
treef3d663f54b48be90db486a218b827fae27b2a8e5 /src/modules/ethumb
parentca5e0c6a9da8975a5c9a51d1909cf2bbfc0f943e (diff)
ethumb emotion module - fix possible division by 0
Diffstat (limited to 'src/modules/ethumb')
-rw-r--r--src/modules/ethumb/emotion/emotion.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/modules/ethumb/emotion/emotion.c b/src/modules/ethumb/emotion/emotion.c
index de091c90f5..4443712be6 100644
--- a/src/modules/ethumb/emotion/emotion.c
+++ b/src/modules/ethumb/emotion/emotion.c
@@ -352,6 +352,7 @@ _thumb_generate(Ethumb *e)
352 int r; 352 int r;
353 const char *file; 353 const char *file;
354 Ethumb_Thumb_Format f; 354 Ethumb_Thumb_Format f;
355 double dv;
355 struct _emotion_plugin *_plugin = calloc(sizeof(struct _emotion_plugin), 1); 356 struct _emotion_plugin *_plugin = calloc(sizeof(struct _emotion_plugin), 1);
356 357
357 o = emotion_object_add(ethumb_evas_get(e)); 358 o = emotion_object_add(ethumb_evas_get(e));
@@ -376,7 +377,9 @@ _thumb_generate(Ethumb *e)
376 _plugin->video = o; 377 _plugin->video = o;
377 _plugin->e = e; 378 _plugin->e = e;
378 379
379 _plugin->ptotal = ethumb_video_time_get(e) / ethumb_video_ntimes_get(e); 380 dv = ethumb_video_ntimes_get(e);
381 if (dv > 0.0) _plugin->ptotal = ethumb_video_time_get(e) / dv;
382 else _plugin->ptotal = 0.0;
380 _plugin->pcount = 1; 383 _plugin->pcount = 1;
381 384
382 _resize_movie(_plugin); 385 _resize_movie(_plugin);