#! /bin/sh /usr/share/dpatch/dpatch-run
## fix-encoder-decoder-detection.dpatch by Joachim Reichel <reichel@debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Detect encoder and decoder dynamically at runtime. This results in
## DP: better defaults depending on the user's environment and avoids data loss
## DP: if no suitable encoder/decoder is found.

@DPATCH@
diff -urNad normalize-audio-0.7.7~/src/normalize-mp3.in normalize-audio-0.7.7/src/normalize-mp3.in
--- normalize-audio-0.7.7~/src/normalize-mp3.in	2010-06-16 20:05:57.000000000 +0200
+++ normalize-audio-0.7.7/src/normalize-mp3.in	2010-06-16 20:06:19.000000000 +0200
@@ -26,12 +26,12 @@
 # %b becomes bitrate of re-encoded file, as specified by the -b option
 # Example: $OGGENCODE="oggenc -Q -b %b -o %m %w"
 
-$MP3DECODE  = "@MP3DECODE@";
-$MP3ENCODE  = "@MP3ENCODE@";
-$OGGDECODE  = "@OGGDECODE@";
-$OGGENCODE  = "@OGGENCODE@";
-$FLACDECODE = "@FLACDECODE@";
-$FLACENCODE = "@FLACENCODE@";
+# $MP3DECODE  = "@MP3DECODE@";
+# $MP3ENCODE  = "@MP3ENCODE@";
+# $OGGDECODE  = "@OGGDECODE@";
+# $OGGENCODE  = "@OGGENCODE@";
+# $FLACDECODE = "@FLACDECODE@";
+# $FLACENCODE = "@FLACENCODE@";
 
 # The %w etc. substitutions should *not* be used in the following, as
 # this script knows about their options already.
@@ -614,7 +614,7 @@
 	    }
 
 	    unless ($encoder) {
-		print STDERR "$progname: $output_file: no decoder available\n";
+		print STDERR "$progname: $output_file: no encoder available\n";
 		print STDERR "$progname: leaving output in $tmp_file\n";
 		next;
 	    }
