}
},
(NACodecTypeInfo::Audio(sainfo), NACodecTypeInfo::Audio(dainfo)) => {
- if sainfo == dainfo {
+ let icodec = istr.get_info().get_name();
+ if (sainfo == dainfo) && (icodec != "pcm" || oopts.enc_name.as_str() == "pcm") {
OutputConvert::None
} else {
let dchmap = match dainfo.channels {
let mut found_vid = false;
for (iidx, istr) in src_sm.iter().enumerate() {
- if istr.get_media_type() == StreamType::Video && !found_vid {
+ if istr.get_media_type() == StreamType::Video {
match self.register_output_stream("any", istr, iidx, out_sm, enc_reg) {
RegisterResult::Ok => found_vid = true,
RegisterResult::Failed => return false,
let mut found_aud = false;
for (iidx, istr) in src_sm.iter().enumerate() {
- if istr.get_media_type() == StreamType::Audio && !found_aud {
+ if istr.get_media_type() == StreamType::Audio {
match self.register_output_stream("any", istr, iidx, out_sm, enc_reg) {
RegisterResult::Ok => found_aud = true,
RegisterResult::Failed => return false,