Просмотр исходного кода

Leave all files in place in case of length mis-matches. The most common case for this is bad length calculation in an unindexed wrapper (e.g. MPEG-TS) so the most common fix is to compare file lengths with an index-building video tool. If one of those becomes easily scriptable I will change movInfo to use it; in the mean time leave both files around so wedo not need to manually recode to check the output.

Zachary Kotlarek 14 лет назад
Родитель
Сommit
1e2a25aece
1 измененных файлов с 1 добавлено и 7 удалено
  1. 1 7
      recode

+ 1 - 7
recode

@@ -70,13 +70,7 @@ if [ -r "${IN}" ]; then
 	fi
 	if [ $LENGTH_DIFF -gt $RECODE_MAX_DIFF ] ; then
 		KEEP_IN=1
-		if [ $LENGTH_IN -le 1 ] && [ $LENGTH_OUT -ge 1 ]; then
-			echo "`basename "${0}"`: Input file has an invalid duration and will not be deleted: ${IN}" 1>&2
-		else
-			echo "`basename "${0}"`: Output file duration (${LENGTH_OUT}) does not match input file duration (${LENGTH_IN}): ${IN}" 1>&2
-			rm -f "${OUT}"
-			exit 1
-		fi
+		echo "`basename "${0}"`: Output file duration (${LENGTH_OUT}) does not match input file duration (${LENGTH_IN}): ${IN}" 1>&2
 	fi
 
 	# Remove the input file if all is well