From 6b3ac87c9982b72ad5407b37910afc8230da5c10 Mon Sep 17 00:00:00 2001 From: Vincent Riquer Date: Tue, 30 Apr 2013 13:07:30 +0200 Subject: [PATCH] conditional use of sox for video --- lib/decode/decodeFile | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/decode/decodeFile b/lib/decode/decodeFile index cc52f01..09c2dc3 100644 --- a/lib/decode/decodeFile +++ b/lib/decode/decodeFile @@ -3,7 +3,17 @@ decodeFile() { case "$mimetype" in 'video/'*) extractAudio - sox_needed=1 + if (( ${destinationnormalize["$destination"]}))\ + || ( + [ -n "${destinationfrequency["$destination"]}" ]\ + && (( ${rate:-0} != ${destinationfrequency["$destination"]}))\ + ) || ( + [ -n "${destinationchannels["$destination"]}" ]\ + && (( ${channels:-0} != ${destinationchannels["$destination"]} )) + ) + then + sox_needed=1 + fi ;; 'audio/mpeg') if [[ ${destinationformat[$destination]} = mp3 ]] \