blob: 9f6b3f800aa4248cfe68791f0a019c8c7804d189 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
diff -r -u vdrrip-0.3.0/scripts/queuehandler.sh vdrrip-0.3.0.gentoo/scripts/queuehandler.sh
--- vdrrip-0.3.0/scripts/queuehandler.sh 2006-10-06 00:12:10.000000000 +0200
+++ vdrrip-0.3.0.gentoo/scripts/queuehandler.sh 2006-10-06 00:11:50.000000000 +0200
@@ -305,6 +305,12 @@
# start the preview in the middle of the movie
local length=`"$mp" -identify -frames 0 "$dir/001.vdr" 2>/dev/null | grep ID_LENGTH | cut -d"=" -f2`
+ # repeat command if failed first time
+ if [ -z "$length" ]
+ then
+ length=`"$mp" -identify -frames 0 "$dir/001.vdr" 2>/dev/null | \
+ grep ID_LENGTH | cut -d"=" -f2`
+ fi
let local ss=length/2
previewval="-ss $ss -endpos $previewlength"
}
@@ -790,6 +796,12 @@
# detect length of splitted file and add it to $splitpos
local length=`$mplayer -identify -frames 0 $tempdir/$ofile 2>/dev/null | \
grep ID_LENGTH | cut -d= -f2`
+ # repeat command if failed first time
+ if [ -z "$length" ]
+ then
+ length=`$mplayer -identify -frames 0 $tempdir/$ofile 2>/dev/null | \
+ grep ID_LENGTH | cut -d= -f2`
+ fi
let splitpos=splitpos+length-overlap
let count=count+1
done
|