Update example based on api changes

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages
2022-06-29 09:38:01 +08:00
parent 3c0f2dfed7
commit b45dc606f1
4 changed files with 10 additions and 9 deletions

View File

@@ -104,9 +104,6 @@ fn main() -> io::Result<()> {
timebase: [1, 1000],
bitrate: args.flag_bv,
codec: vpx_codec,
rc_min_quantizer: 0,
rc_max_quantizer: 0,
speed: 6,
num_threads: 0,
}))
.unwrap();
@@ -137,7 +134,7 @@ fn main() -> io::Result<()> {
break;
}
if let Ok(frame) = c.frame(0) {
if let Ok(frame) = c.frame(Duration::from_millis(0)) {
let ms = time.as_secs() * 1000 + time.subsec_millis() as u64;
for frame in vpx.encode(ms as i64, &frame, STRIDE_ALIGN).unwrap() {