X-Git-Url: https://git.nihav.org/?p=nihav-player.git;a=blobdiff_plain;f=sndplay%2Fsrc%2Fmain.rs;h=275826ff9f7db9d425b5efc9a3c37a12179ba3ef;hp=c8e75a420731439355bad5c45ef1e7f432485aa7;hb=0a70659f1bac51dda65d0c8349a219c565b56c8c;hpb=aa5a110c9fa3301102459c74ba1340b36d975693 diff --git a/sndplay/src/main.rs b/sndplay/src/main.rs index c8e75a4..275826f 100644 --- a/sndplay/src/main.rs +++ b/sndplay/src/main.rs @@ -153,6 +153,9 @@ impl<'a> Decoder<'a> { if let Some(pts) = frm.ts.get_pts() { self.samplepos = NATimeInfo::ts_to_time(pts, u64::from(self.arate), frm.ts.tb_num, frm.ts.tb_den); } + if buf.get_audio_length() == 0 { + return false; + } let out_buf = convert_audio_frame(&buf, &self.dst_info, &self.dst_chmap).unwrap(); match out_buf { NABufferType::AudioI16(abuf) => {