shithub: opus-tools

Download patch

ref: db204761aca6b77059a063dcddce3972063baa1d
parent: 678f5407faf9a85359162728c3cb3e9087c17499
author: Gregory Maxwell <greg@xiph.org>
date: Mon Jun 11 13:25:48 EDT 2012

Get rid of cruddy bitrate spinner in the decoder.

--- a/man/opusdec.1
+++ b/man/opusdec.1
@@ -49,7 +49,7 @@
 .SH "OPTIONS"
 .IP "-h, --help"
 Print help message
-.IP "-V, --version"
+.IP "-v, --version"
 Display version information
 .IP "--quiet"
 Suppresses program output
--- a/src/opusdec.c
+++ b/src/opusdec.c
@@ -391,7 +391,6 @@
    printf (" --no-dither           Do not dither 16-bit output\n");
    printf (" --packet-loss n       Simulate n %% random packet loss\n");
    printf (" --save-range file     Saves check values for every frame to a file\n");
-   printf (" -V                    Verbose mode (show bitrate)\n");
    printf (" -h, --help            This help\n");
    printf (" -v, --version         Version information\n");
    printf (" --quiet               Quiet mode\n");
@@ -553,7 +552,6 @@
    ogg_page       og;
    ogg_packet     op;
    ogg_stream_state os;
-   int print_bitrate=0;
    int close_in=0;
    int eos=0;
    ogg_int64_t audio_size=0;
@@ -636,9 +634,6 @@
          version();
          exit(0);
          break;
-      case 'V':
-         print_bitrate=1;
-         break;
       case '?':
          usage();
          exit(1);
@@ -792,12 +787,6 @@
                for (i=0;i<frame_size*channels;i++)
                   output[i] *= gain;
 
-               if (print_bitrate) {
-                  opus_int32 tmp=op.bytes;
-                  char ch=13;
-                  fputc (ch, stderr);
-                  fprintf (stderr, "Bitrate in use: %d bytes/packet     ", tmp);
-               }
                maxout=((page_granule-gran_offset)*rate/48000)-link_out;
                outsamp=audio_write(output, channels, frame_size, fout, resampler, &preskip, dither?&shapemem:0, strlen(outFile)!=0,0>maxout?0:maxout);
                link_out+=outsamp;