[vlc-commits] opus: support setting bitrate

Ilkka Ollakka git at videolan.org
Sun Feb 9 12:20:47 CET 2014


vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Sun Feb  9 13:15:35 2014 +0200| [bdf9d06c4f627639fe58c35e152014621de80165] | committer: Ilkka Ollakka

opus: support setting bitrate

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=bdf9d06c4f627639fe58c35e152014621de80165
---

 modules/codec/opus.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/modules/codec/opus.c b/modules/codec/opus.c
index 8aa8adb..0df17c7 100644
--- a/modules/codec/opus.c
+++ b/modules/codec/opus.c
@@ -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 */



More information about the vlc-commits mailing list