[xiph-cvs] cvs commit: vorbis-tools/oggenc encode.c

Michael Smith msmith at xiph.org
Sat Nov 24 18:15:44 PST 2001



msmith      01/11/24 18:15:43

  Modified:    oggenc   encode.c
  Log:
  Stupid bug setting wrong unset value for min/max bitrates

Revision  Changes    Path
1.12      +4 -2      vorbis-tools/oggenc/encode.c

Index: encode.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis-tools/oggenc/encode.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- encode.c	2001/09/28 07:54:39	1.11
+++ encode.c	2001/11/25 02:15:43	1.12
@@ -62,8 +62,10 @@
         }
         else
         {
-		if(vorbis_encode_init(&vi, opt->channels, opt->rate, opt->min_bitrate*1000,
-				opt->bitrate*1000, opt->max_bitrate*1000))
+		if(vorbis_encode_init(&vi, opt->channels, opt->rate, 
+                    opt->min_bitrate>0?opt->min_bitrate*1000:-1,
+				    opt->bitrate*1000, 
+                    opt->max_bitrate>0?opt->max_bitrate*1000:-1))
                 {
                         fprintf(stderr, "Mode initialisation failed: invalid parameters for bitrate\n");
                         vorbis_info_clear(&vi);

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list