mirror of
https://github.com/rustdesk/magnum-opus.git
synced 2026-07-12 18:04:18 +00:00
Correct unnecessary mutable variables
This commit is contained in:
+2
-2
@@ -316,7 +316,7 @@ impl Encoder {
|
|||||||
|
|
||||||
/// Enable or disable variable bitrate.
|
/// Enable or disable variable bitrate.
|
||||||
pub fn set_vbr(&mut self, vbr: bool) -> Result<()> {
|
pub fn set_vbr(&mut self, vbr: bool) -> Result<()> {
|
||||||
let mut value: i32 = if vbr { 1 } else { 0 };
|
let value: i32 = if vbr { 1 } else { 0 };
|
||||||
enc_ctl!(self, OPUS_SET_VBR, value);
|
enc_ctl!(self, OPUS_SET_VBR, value);
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
@@ -330,7 +330,7 @@ impl Encoder {
|
|||||||
|
|
||||||
/// Enable or disable constrained VBR.
|
/// Enable or disable constrained VBR.
|
||||||
pub fn set_vbr_constraint(&mut self, vbr: bool) -> Result<()> {
|
pub fn set_vbr_constraint(&mut self, vbr: bool) -> Result<()> {
|
||||||
let mut value: i32 = if vbr { 1 } else { 0 };
|
let value: i32 = if vbr { 1 } else { 0 };
|
||||||
enc_ctl!(self, OPUS_SET_VBR_CONSTRAINT, value);
|
enc_ctl!(self, OPUS_SET_VBR_CONSTRAINT, value);
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user