From 3af52d5a056fe3392d7505dedf7ead0d8bcd9b7c Mon Sep 17 00:00:00 2001
From: "Alan J. Pippin" <ajp@pippins.net>
Date: Thu, 11 Feb 2010 08:03:40 -0700
Subject: [PATCH] Fixed bug in having -s override Handbrake preset bitrates

---
 rip_dvd | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/rip_dvd b/rip_dvd
index f58a00b..e68012a 100755
--- a/rip_dvd
+++ b/rip_dvd
@@ -1102,7 +1102,7 @@ function get_audio_track_from_vob {
   track=`expr match "$stream" '^\([0-9]*\):'`
 
   if [ -n "$track" ]; then   
-    echo "-> Setting the audio ID to $aid. Setting the audio track to $track." | tee -a "$logfile"
+    echo "   Setting the audio ID to $aid. Setting the audio track to $track." | tee -a "$logfile"
   fi
 }
 
@@ -1239,6 +1239,7 @@ function calculate_bitrate_from_target_size {
   if [ $target_size -ne 0 ]; then
     vob_length=`mplayer -identify -v "$vobfile" -endpos 0 2>&1 | grep ID_LENGTH | awk -F '=' '{ print $2 }' | awk -F '.' '{ print $1 }'`
     ((target_bitrate = (target_size * 1024 * 8) / vob_length ))
+    custom_bitrate=1
     echo "   With a given target size of $target_size MB, the estimated bit rate will need to be $target_bitrate kbits/sec"
   fi
 }
-- 
2.34.1