Only set PTS

This commit is contained in:
2024-08-30 14:38:50 +01:00
parent 2afbde6c53
commit 57e3eed69e
10 changed files with 65 additions and 40 deletions

View File

@ -157,6 +157,12 @@ impl HlsEgress {
.iter()
.find(|x| x.id() == *v)
.ok_or(Error::msg("Variant does not exist"))?,
AVPacketSource::Muxer(v) => self
.config
.variants
.iter()
.find(|x| x.id() == *v)
.ok_or(Error::msg("Variant does not exist"))?,
_ => return Err(Error::msg(format!("Cannot mux packet from {:?}", src))),
};
(*pkt).stream_index = variant.dst_index() as libc::c_int;
@ -176,6 +182,7 @@ impl HlsEgress {
) -> Result<(), Error> {
let variant = match &src {
AVPacketSource::Encoder(v) => v,
AVPacketSource::Muxer(v) => v,
_ => return Err(Error::msg(format!("Cannot mux packet from {:?}", src))),
};
if !self.init {