Ticket #10821: debian-patches

File debian-patches, 12.5 KB (added by vinc17@…, 18 years ago)

the patches

Line 
1diff -Naurd vorbis-tools-1.1.1.old/ogg123/file_transport.c vorbis-tools-1.1.1/ogg123/file_transport.c
2--- vorbis-tools-1.1.1.old/ogg123/file_transport.c      2005-06-03 10:15:09.000000000 +0000
3+++ vorbis-tools-1.1.1/ogg123/file_transport.c  2006-10-02 23:23:26.000000000 +0000
4@@ -26,6 +26,7 @@
5 typedef struct file_private_t {
6   FILE *fp;
7   data_source_stats_t stats;
8+  int seekable;
9 } file_private_t;
10 
11 
12@@ -51,6 +52,7 @@
13     source->transport = &file_transport;
14     source->private = private;
15     
16+    private->seekable = 1;
17     private->stats.transfer_rate = 0;
18     private->stats.bytes_read = 0;
19     private->stats.input_buffer_used = 0;
20@@ -60,9 +62,10 @@
21   }
22 
23   /* Open file */
24-  if (strcmp(source_string, "-") == 0)
25+  if (strcmp(source_string, "-") == 0) {
26     private->fp = stdin;
27-  else
28+    private->seekable = 0;
29+  } else
30     private->fp = fopen(source_string, "r");
31 
32   if (private->fp == NULL) {
33@@ -84,6 +87,8 @@
34   int items;
35   long start;
36 
37+  if (!private->seekable) return 0;
38+
39   /* Record where we are */
40   start = ftell(fp);
41 
42@@ -118,6 +123,8 @@
43   file_private_t *private = source->private;
44   FILE *fp = private->fp;
45 
46+  if (!private->seekable) return -1;
47+
48   return fseek(fp, offset, whence); 
49 }
50 
51@@ -135,6 +142,8 @@
52   file_private_t *private = source->private;
53   FILE *fp = private->fp;
54 
55+  if (!private->seekable) return -1;
56+
57   return ftell(fp);
58 }
59 
60diff -Naurd vorbis-tools-1.1.1.old/ogg123/ogg123.1 vorbis-tools-1.1.1/ogg123/ogg123.1
61--- vorbis-tools-1.1.1.old/ogg123/ogg123.1      2005-06-03 10:15:09.000000000 +0000
62+++ vorbis-tools-1.1.1/ogg123/ogg123.1  2006-10-02 23:28:05.000000000 +0000
63@@ -144,7 +144,7 @@
64 .RE
65 .RE
66 
67-.IP alsa
68+.IP alsa09
69 Advanced Linux Sound Architecture.
70 .RS
71 Options:
72@@ -254,7 +254,7 @@
73 .RE
74 .PP
75 
76-Stress test your harddrive:
77+Stress test your hard drive:
78 .RS
79 .B ogg123 -d oss -d wav -f 1.wav -d wav -f 2.wav -d wav -f 3.wav -d wav -f 4.wav -d wav -f 5.wav  test.ogg
80 .RE
81diff -Naurd vorbis-tools-1.1.1.old/ogg123/ogg123.c vorbis-tools-1.1.1/ogg123/ogg123.c
82--- vorbis-tools-1.1.1.old/ogg123/ogg123.c      2005-06-03 10:15:09.000000000 +0000
83+++ vorbis-tools-1.1.1/ogg123/ogg123.c  2006-03-27 02:11:27.000000000 +0000
84@@ -46,6 +46,7 @@
85 #include "ogg123.h"
86 #include "i18n.h"
87 
88+extern int exit_status; /* from status.c */
89 
90 void exit_cleanup ();
91 void play (char *source_string);
92@@ -396,10 +397,9 @@
93 
94   playlist_array_destroy(playlist_array, items);
95 
96-  exit (0);
97+  exit (exit_status);
98 }
99 
100-
101 void play (char *source_string)
102 {
103   transport_t *transport;
104@@ -615,7 +615,7 @@
105   status_message(1, _("Done."));
106   
107   if (sig_request.exit)
108-    exit (0);
109+    exit (exit_status);
110 }
111 
112 
113diff -Naurd vorbis-tools-1.1.1.old/ogg123/status.c vorbis-tools-1.1.1/ogg123/status.c
114--- vorbis-tools-1.1.1.old/ogg123/status.c      2005-06-03 10:15:09.000000000 +0000
115+++ vorbis-tools-1.1.1/ogg123/status.c  2006-03-27 02:11:27.000000000 +0000
116@@ -25,6 +25,7 @@
117 char temp_buffer[200];
118 int last_line_len = 0;
119 int max_verbosity = 0;
120+int exit_status = EXIT_SUCCESS;
121 
122 pthread_mutex_t output_lock = PTHREAD_MUTEX_INITIALIZER;
123 
124@@ -449,6 +450,8 @@
125   pthread_mutex_unlock(&output_lock);
126 
127   pthread_cleanup_pop(0);
128+
129+  exit_status = EXIT_FAILURE;
130 }
131 
132 
133@@ -462,4 +465,6 @@
134   pthread_mutex_unlock(&output_lock);
135 
136   pthread_cleanup_pop(0);
137+
138+  exit_status = EXIT_FAILURE;
139 }
140diff -Naurd vorbis-tools-1.1.1.old/oggenc/man/oggenc.1 vorbis-tools-1.1.1/oggenc/man/oggenc.1
141--- vorbis-tools-1.1.1.old/oggenc/man/oggenc.1  2005-06-03 10:15:10.000000000 +0000
142+++ vorbis-tools-1.1.1/oggenc/man/oggenc.1      2006-10-02 23:28:05.000000000 +0000
143@@ -247,7 +247,7 @@
144 set closer to 0, the bitrate manager attempts to hoard bits for future
145 use in sudden bitrate increases (biasing toward better transient
146 reproduction).  When set closer to 1, the bitrate manager neglects
147-transients in favor using bits for homogenous passages.  In the
148+transients in favor using bits for homogeneous passages.  In the
149 middle, the manager uses a balanced approach.  The default setting is \.2,
150 thus biasing slightly toward transient reproduction.
151 
152@@ -293,25 +293,25 @@
153 
154 Specifying a high-quality encoding averaging 256 kbps (but still VBR).
155 .RS
156-oggenc infile.wav -b 256 out.ogg
157+oggenc infile.wav -b 256 -o out.ogg
158 .RE
159 .PP
160 
161 Specifying a maximum and average bitrate, and enforcing these.
162 .RS
163-oggenc infile.wav --managed -b 128 -M 160 out.ogg
164+oggenc infile.wav --managed -b 128 -M 160 -o out.ogg
165 .RE
166 .PP
167 
168 Specifying quality rather than bitrate (to a very high quality mode)
169 .RS
170-oggenc infile.wav -q 6 out.ogg
171+oggenc infile.wav -q 6 -o out.ogg
172 .RE
173 .PP
174 
175 Downsampling and downmixing to 11 kHz mono before encoding.
176 .RS
177-oggenc --resample 11025 --downmix infile.wav -q 1 out.ogg
178+oggenc --resample 11025 --downmix infile.wav -q 1 -o out.ogg
179 .RE
180 .PP
181 
182@@ -319,7 +319,7 @@
183 .RS
184 oggenc somefile.wav -t "The track title" -a "artist who performed this" -l
185 "name of album" -c
186-"OTHERFIELD=contents of some other field not explictly supported"
187+"OTHERFIELD=contents of some other field not explicitly supported"
188 .RE
189 .PP
190 
191diff -Naurd vorbis-tools-1.1.1.old/oggenc/oggenc.c vorbis-tools-1.1.1/oggenc/oggenc.c
192--- vorbis-tools-1.1.1.old/oggenc/oggenc.c      2005-06-03 10:15:10.000000000 +0000
193+++ vorbis-tools-1.1.1/oggenc/oggenc.c  2006-10-02 23:27:34.000000000 +0000
194@@ -379,7 +379,7 @@
195 {
196        fprintf(stdout,
197                _("%s%s\n"
198-               "Usage: oggenc [options] input.wav [...]\n"
199+               "Usage: oggenc [options] inputfile [...]\n"
200                "\n"
201                "OPTIONS:\n"
202                " General:\n"
203diff -Naurd vorbis-tools-1.1.1.old/po/fr.po vorbis-tools-1.1.1/po/fr.po
204--- vorbis-tools-1.1.1.old/po/fr.po     2005-06-27 09:34:57.000000000 +0000
205+++ vorbis-tools-1.1.1/po/fr.po 2006-10-02 23:28:24.000000000 +0000
206@@ -771,7 +771,7 @@
207 #: oggenc/encode.c:391
208 #, fuzzy, c-format
209 msgid "\tEncoding [%2dm%.2ds so far] %c "
210-msgstr "\tEncodage [%2dm%.2ds pour l'instant] %c"
211+msgstr "\tCodage [%2dm%.2ds pour l'instant] %c"
212 
213 #: oggenc/encode.c:409
214 #, c-format
215@@ -830,7 +830,7 @@
216 "         %s%s%s \n"
217 "at average bitrate %d kbps "
218 msgstr ""
219-"Encodage de %s%s%s \n"
220+"Codage de %s%s%s \n"
221 "         en %s%s%s \n"
222 "au débit moyen de %d kbps "
223 
224@@ -851,7 +851,7 @@
225 "         %s%s%s \n"
226 "at approximate bitrate %d kbps (VBR encoding enabled)\n"
227 msgstr ""
228-"Encodage de %s%s%s \n"
229+"Codage de %s%s%s \n"
230 "         en %s%s%s \n"
231 "au débit approximatif de %d kbps (encodage VBR en cours)\n"
232 
233@@ -862,7 +862,7 @@
234 "         %s%s%s \n"
235 "at quality level %2.2f using constrained VBR "
236 msgstr ""
237-"Encodage de %s%s%s \n"
238+"Codage de %s%s%s \n"
239 "         en %s%s%s \n"
240 "au niveau de qualité %2.2f en utilisant un VBR contraint "
241 
242@@ -873,7 +873,7 @@
243 "         %s%s%s \n"
244 "at quality %2.2f\n"
245 msgstr ""
246-"Encodage de %s%s%s \n"
247+"Codage de %s%s%s \n"
248 "         en %s%s%s \n"
249 "à la qualité %2.2f\n"
250 
251@@ -884,7 +884,7 @@
252 "         %s%s%s \n"
253 "using bitrate management "
254 msgstr ""
255-"Encodage de %s%s%s \n"
256+"Codage de %s%s%s \n"
257 "         en %s%s%s \n"
258 "en utilisant la gestion du débit "
259 
260diff -Naurd vorbis-tools-1.1.1.old/share/charset.c vorbis-tools-1.1.1/share/charset.c
261--- vorbis-tools-1.1.1.old/share/charset.c      2005-06-03 10:15:10.000000000 +0000
262+++ vorbis-tools-1.1.1/share/charset.c  2006-10-02 23:24:04.000000000 +0000
263@@ -27,6 +27,10 @@
264  * 8-bit char, 16-bit short and 32-bit int.
265  */
266 
267+#ifdef HAVE_CONFIG_H
268+# include <config.h>
269+#endif
270+
271 #ifndef HAVE_ICONV /* should be ifdef USE_CHARSET_CONVERT */
272 
273 #include <stdlib.h>
274diff -Naurd vorbis-tools-1.1.1.old/share/iconvert.c vorbis-tools-1.1.1/share/iconvert.c
275--- vorbis-tools-1.1.1.old/share/iconvert.c     2005-06-03 10:15:10.000000000 +0000
276+++ vorbis-tools-1.1.1/share/iconvert.c 2006-10-02 23:24:04.000000000 +0000
277@@ -16,6 +16,10 @@
278  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
279  */
280 
281+#ifdef HAVE_CONFIG_H
282+# include <config.h>
283+#endif
284+
285 #ifdef HAVE_ICONV
286 
287 #include <assert.h>
288diff -Naurd vorbis-tools-1.1.1.old/share/utf8.c vorbis-tools-1.1.1/share/utf8.c
289--- vorbis-tools-1.1.1.old/share/utf8.c 2005-06-03 10:15:10.000000000 +0000
290+++ vorbis-tools-1.1.1/share/utf8.c     2006-10-02 23:24:04.000000000 +0000
291@@ -21,6 +21,10 @@
292  * Convert a string between UTF-8 and the locale's charset.
293  */
294 
295+#ifdef HAVE_CONFIG_H
296+# include <config.h>
297+#endif
298+
299 #include <stdlib.h>
300 #include <string.h>
301 
302diff -Naurd vorbis-tools-1.1.1.old/vorbiscomment/vcomment.c vorbis-tools-1.1.1/vorbiscomment/vcomment.c
303--- vorbis-tools-1.1.1.old/vorbiscomment/vcomment.c     2005-06-13 13:11:43.000000000 +0000
304+++ vorbis-tools-1.1.1/vorbiscomment/vcomment.c 2006-10-02 23:23:49.000000000 +0000
305@@ -63,7 +63,7 @@
306 void free_param(param_t *param);
307 void parse_options(int argc, char *argv[], param_t *param);
308 void open_files(param_t *p);
309-void close_files(param_t *p);
310+void close_files(param_t *p, int output_written);
311 
312 
313 /**********
314@@ -107,7 +107,7 @@
315                {
316                        fprintf(stderr, _("Failed to open file as vorbis: %s\n"),
317                                        vcedit_error(state));
318-            close_files(param);
319+            close_files(param, 0);
320             free_param(param);
321             vcedit_clear(state);
322                        return 1;
323@@ -120,7 +120,7 @@
324                /* done */
325                vcedit_clear(state);
326 
327-               close_files(param);
328+               close_files(param, 0);
329         free_param(param);
330                return 0;               
331        }
332@@ -133,7 +133,7 @@
333                {
334                        fprintf(stderr, _("Failed to open file as vorbis: %s\n"),
335                                        vcedit_error(state));
336-            close_files(param);
337+            close_files(param, 0);
338             free_param(param);
339             vcedit_clear(state);
340                        return 1;
341@@ -174,7 +174,7 @@
342                {
343                        fprintf(stderr, _("Failed to write comments to output file: %s\n"),
344                                        vcedit_error(state));
345-            close_files(param);
346+            close_files(param, 0);
347             free_param(param);
348             vcedit_clear(state);
349                        return 1;
350@@ -183,7 +183,7 @@
351                /* done */
352                vcedit_clear(state);
353               
354-               close_files(param);
355+               close_files(param, 1);
356         free_param(param);
357                return 0;
358        }
359@@ -527,23 +527,31 @@
360 
361 ***********/
362 
363-void close_files(param_t *p)
364+void close_files(param_t *p, int output_written)
365 {
366-       if (p->in != NULL && p->in != stdin) fclose(p->in);
367-       if (p->out != NULL && p->out != stdout) fclose(p->out);
368-       if (p->com != NULL && p->com != stdout && p->com != stdin) fclose(p->com);
369+  if (p->in != NULL && p->in != stdin) fclose(p->in);
370+  if (p->out != NULL && p->out != stdout) fclose(p->out);
371+  if (p->com != NULL && p->com != stdout && p->com != stdin) fclose(p->com);
372 
373-       if(p->tempoutfile) {
374-        /* Some platforms fail to rename a file if the new name already exists,
375-         * so we need to remove, then rename. How stupid.
376-         */
377-               if(rename(p->outfilename, p->infilename)) {
378-            if(remove(p->infilename))
379-                fprintf(stderr, _("Error removing old file %s\n"), p->infilename);
380-            else if(rename(p->outfilename, p->infilename))
381-                fprintf(stderr, _("Error renaming %s to %s\n"), p->outfilename,
382-                        p->infilename);
383-        }
384+  if(p->tempoutfile) {
385+    if(output_written) {
386+      /* Some platforms fail to rename a file if the new name already
387+       * exists, so we need to remove, then rename. How stupid.
388+       */
389+      if(rename(p->outfilename, p->infilename)) {
390+        if(remove(p->infilename))
391+          fprintf(stderr, _("Error removing old file %s\n"), p->infilename);
392+        else if(rename(p->outfilename, p->infilename))
393+          fprintf(stderr, _("Error renaming %s to %s\n"), p->outfilename,
394+                  p->infilename);
395+      }
396+    }
397+    else {
398+      if(remove(p->outfilename)) {
399+        fprintf(stderr, _("Error removing erroneous temporary file %s\n"),
400+                    p->outfilename);
401+      }
402     }
403+  }
404 }
405 
406diff -Naurd vorbis-tools-1.1.1.old/vorbiscomment/vorbiscomment.1 vorbis-tools-1.1.1/vorbiscomment/vorbiscomment.1
407--- vorbis-tools-1.1.1.old/vorbiscomment/vorbiscomment.1        2005-06-03 10:15:08.000000000 +0000
408+++ vorbis-tools-1.1.1/vorbiscomment/vorbiscomment.1    2006-10-02 23:28:05.000000000 +0000
409@@ -44,6 +44,8 @@
410 Specify a new tag on the command line. Each tag is given as a single string. The part before the '=' is treated as the tag name and the part after as the value.
411 .IP "-w"
412 Replace comments with the new set given either on the command line with -t or from a file with -c.
413+.IP "-R"
414+Read and write comments in utf8, rather than converting to the user's character set.
415 
416 .\" Examples go here
417 .SH EXAMPLES
418@@ -55,7 +57,7 @@
419 To edit those comments:
420 
421     vorbiscomment -l file.ogg > file.txt
422-    [edit the comments in file.txt to your statisfaction]
423+    [edit the comments in file.txt to your satisfaction]
424     vorbiscomment -w -c file.txt file.ogg newfile.ogg
425 
426 To simply add a comment: