X-Git-Url: https://git.nihav.org/?p=nihav.git;a=blobdiff_plain;f=nihav-commonfmt%2Fsrc%2Fcodecs%2Fpcm.rs;h=46b19928b1436ec1496696356404570277917b28;hp=b125c64aa11277f7fbb850b29d7d9f62bfa64e02;hb=a480a0de101483d802a11e72d758dae00fa4860a;hpb=67a315858b8b74d4fd9a34048d4ab50530a5bf18 diff --git a/nihav-commonfmt/src/codecs/pcm.rs b/nihav-commonfmt/src/codecs/pcm.rs index b125c64..46b1992 100644 --- a/nihav-commonfmt/src/codecs/pcm.rs +++ b/nihav-commonfmt/src/codecs/pcm.rs @@ -174,7 +174,7 @@ impl NAEncoder for PCMEncoder { ofmt.format = NACodecTypeInfo::Audio(NAAudioInfo::new(0, 0, SND_S16P_FORMAT, 0)); Ok(ofmt) }, - NACodecTypeInfo::Video(_) => return Err(EncoderError::FormatError), + NACodecTypeInfo::Video(_) => Err(EncoderError::FormatError), NACodecTypeInfo::Audio(_) => { Ok(*encinfo) } @@ -186,7 +186,7 @@ impl NAEncoder for PCMEncoder { NACodecTypeInfo::Video(_) => Err(EncoderError::FormatError), NACodecTypeInfo::Audio(_) => { let info = NACodecInfo::new("pcm", encinfo.format, None); - let mut stream = NAStream::new(StreamType::Audio, stream_id, info, encinfo.tb_num, encinfo.tb_den); + let mut stream = NAStream::new(StreamType::Audio, stream_id, info, encinfo.tb_num, encinfo.tb_den, 0); stream.set_num(stream_id as usize); let stream = stream.into_ref(); self.stream = Some(stream.clone());