diff --git a/src/decoder.rs b/src/decoder.rs index 3b77d8c..1acb702 100644 --- a/src/decoder.rs +++ b/src/decoder.rs @@ -84,9 +84,11 @@ pub struct SharedState { pub struct Decoder { pub input_ctx: DemuxContext, - best_stream_idx: usize, pub decoder: DecodeContext, pub resampler: ResamplingContext, + + best_stream_idx: usize, + dummy_frame: Option , } impl Decoder { @@ -107,9 +109,11 @@ impl Decoder { Ok (Self { input_ctx, - best_stream_idx, decoder, resampler, + + best_stream_idx, + dummy_frame: None, }) } @@ -133,8 +137,8 @@ impl Decoder { if actual_bytes > expected_bytes { let extra_bytes = actual_bytes - expected_bytes; let extra_samples = extra_bytes / 4 / 2; - tracing::debug! ("Extra bytes: {}", extra_bytes); - tracing::debug! ("Extra samples: {}", extra_samples); + // tracing::debug! ("Extra bytes: {}", extra_bytes); + // tracing::debug! ("Extra samples: {}", extra_samples); } Some (frame) @@ -175,26 +179,18 @@ impl Decoder { } pub fn pump_resampler (&mut self) -> Result