From fc6c0755efa1bc8a2c391273339ad0c2c279ab91 Mon Sep 17 00:00:00 2001 From: lummax Date: Fri, 18 Sep 2015 20:53:49 +0200 Subject: [PATCH] examples/transcode-audio: set `{max_}bit_rate` --- examples/transcode-audio.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/transcode-audio.rs b/examples/transcode-audio.rs index ecd5729..8ff3ec8 100644 --- a/examples/transcode-audio.rs +++ b/examples/transcode-audio.rs @@ -65,6 +65,8 @@ fn transcoder>(ictx: &mut format::context::Input, octx: &mut form encoder.set_channel_layout(channel_layout); encoder.set_channels(channel_layout.channels()); encoder.set_format(codec.formats().expect("unknown supported formats").next().unwrap()); + encoder.set_bit_rate(decoder.bit_rate()); + encoder.set_max_bit_rate(decoder.max_bit_rate()); encoder.set_time_base((1, decoder.rate() as i32)); output.set_time_base((1, decoder.rate() as i32));