From 7409586d5e081e2dcad780ce578a99537d7c4ac2 Mon Sep 17 00:00:00 2001 From: josch Date: Sun, 21 Oct 2007 19:54:45 +0000 Subject: [PATCH] fixed multiple of two issue git-svn-id: http://yolanda.mister-muffin.de/svn@113 7eef14d0-6ed0-489d-bf55-20463b2d70db --- trunk/gnutube_daemon.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/trunk/gnutube_daemon.pl b/trunk/gnutube_daemon.pl index 23ec01e..e4a1cf6 100755 --- a/trunk/gnutube_daemon.pl +++ b/trunk/gnutube_daemon.pl @@ -141,11 +141,11 @@ while(1) #the width/height calculation could of course be much shorter but less readable then $tnwidth = 160; - $tnheight = int(160*($height/$width) + .5); + $tnheight = int(160*($height/$width)/2 + .5)*2; if($tnheight > 120) { $tnheight = 120; - $tnwidth = int(120*($width/$height) + .5); + $tnwidth = int(120*($width/$height)/2 + .5)*2; } system "ffmpeg -i $gnutube_root/tmp/$id -vcodec mjpeg -vframes 1 -an -f rawvideo -ss $thumbnailsec -s ".$tnwidth."x$tnheight $gnutube_root/video-stills/$id";