]> git.sesse.net Git - vlc/commitdiff
opus: support setting bitrate
authorIlkka Ollakka <ileoo@videolan.org>
Sun, 9 Feb 2014 11:15:35 +0000 (13:15 +0200)
committerIlkka Ollakka <ileoo@videolan.org>
Sun, 9 Feb 2014 11:20:04 +0000 (13:20 +0200)
modules/codec/opus.c

index 8aa8adb42b47199310d7d6d21b9eee96444a580e..0df17c7047c8ceebeaa5cd93182441286fa5c15a 100644 (file)
@@ -614,7 +614,10 @@ static int OpenEncoder(vlc_object_t *p_this)
         goto error;
     }
 
-    /* TODO: vbr, bitrate, fec */
+    /* TODO: vbr, fec */
+
+    if( enc->fmt_out.i_bitrate )
+        opus_multistream_encoder_ctl(sys->enc, OPUS_SET_BITRATE( enc->fmt_out.i_bitrate ));
 
     /* Buffer for incoming audio, since opus only accepts frame sizes that are
        multiples of 2.5ms */