fix for no opus output in time, max-delay doesn't work with 0 value

This commit is contained in:
Muaz Ahmad 2023-10-13 14:54:00 +05:00
parent 3a1c222340
commit 642ddc2dcd
2 changed files with 1 additions and 2 deletions

View file

@ -30,7 +30,7 @@ pub fn new_opus(metadata: Arc<util::Metadata>) -> Result<OpusEncoder, Box<dyn Er
"--raw-bits", "16", "--raw-bits", "16",
"--raw-rate", samplerate.as_str(), "--raw-rate", samplerate.as_str(),
"--raw-chan", channels.as_str(), "--raw-chan", channels.as_str(),
"--raw-endianness", "1", "--max-delay", "1",
"-", "-" "-", "-"
]).stdin(Stdio::piped()).stdout(f).spawn()?; ]).stdin(Stdio::piped()).stdout(f).spawn()?;
return Ok(OpusEncoder {cmd: cmd}); return Ok(OpusEncoder {cmd: cmd});

View file

@ -6,7 +6,6 @@ use std::process::{ChildStdin, ChildStdout};
use std::sync::mpsc; use std::sync::mpsc;
use std::io::{Read, Write}; use std::io::{Read, Write};
use std::thread; use std::thread;
use crate::util; use crate::util;
pub trait Encoder { pub trait Encoder {