From 7f1650a7cdec2afc6669ce6607f46d1a6191e780 Mon Sep 17 00:00:00 2001 From: josch Date: Wed, 9 Apr 2008 19:41:56 +0000 Subject: [PATCH] fixed length of video to encode git-svn-id: http://yolanda.mister-muffin.de/svn@290 7eef14d0-6ed0-489d-bf55-20463b2d70db --- trunk/video.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/trunk/video.pl b/trunk/video.pl index 151b567..502350d 100644 --- a/trunk/video.pl +++ b/trunk/video.pl @@ -41,8 +41,8 @@ if($query->url_param('id')) #if id is found if($rowcount == 1) { - $sth = $dbh->prepare("select sum(duration) from uploaded"); - $sth->execute() or die $dbh->errstr; + $sth = $dbh->prepare("select sum(duration) from uploaded where id < ?"); + $sth->execute($query->url_param('id')) or die $dbh->errstr; ($length) = $sth->fetchrow_array(); $h = int($length/3600); $m = int($length/60-$h*60);