Skip to content

Commit

Permalink
chore: Lower log level for some logs.
Browse files Browse the repository at this point in the history
They are annoying in some cases.

Fixes #304, #305.
  • Loading branch information
pdeljanov committed Nov 7, 2024
1 parent f1a0df4 commit 08b14a3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions symphonia-bundle-mp3/src/demuxer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ impl FormatReader for MpaReader {

// The base Xing/Info tag may contain the number of frames.
if let Some(num_mpeg_frames) = info_tag.num_frames {
info!("using xing header for duration");
debug!("using xing header for duration");

let num_frames = u64::from(num_mpeg_frames) * header.duration();

Expand All @@ -133,7 +133,7 @@ impl FormatReader for MpaReader {
}
}
else if let Some(vbri_tag) = try_read_vbri_tag(&packet, &header) {
info!("using vbri header for duration");
debug!("using vbri header for duration");

let num_frames = u64::from(vbri_tag.num_mpeg_frames) * header.duration();

Expand Down Expand Up @@ -768,7 +768,7 @@ fn try_read_info_tag_inner(buf: &[u8], header: &FrameHeader) -> Result<Option<Xi
}
else {
// The tag is truncated. No CRC will be present.
info!("xing tag lame extension is truncated");
debug!("xing tag lame extension is truncated");
None
};

Expand All @@ -788,13 +788,13 @@ fn try_read_info_tag_inner(buf: &[u8], header: &FrameHeader) -> Result<Option<Xi
}
else {
// The CRC did not match, this is probably not a LAME tag.
warn!("xing tag lame extension crc mismatch");
debug!("xing tag lame extension crc mismatch");
None
}
}
else {
// Frame not large enough for a LAME tag.
info!("xing tag too small for lame extension");
debug!("xing tag too small for lame extension");
None
};

Expand Down
6 changes: 3 additions & 3 deletions symphonia-bundle-mp3/src/layer3/requantize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use std::{f32, f64};

use lazy_static::lazy_static;

use log::info;
use log::debug;

lazy_static! {
/// Lookup table for computing x(i) = s(i)^(4/3) where s(i) is a decoded Huffman sample. The
Expand Down Expand Up @@ -224,13 +224,13 @@ pub(super) fn read_huffman_samples<B: ReadBitsLtr>(
// samples, therefore, undo them! The caller will be reponsible for re-aligning the bitstream
// reader. Candy Pop confirms this.
else if bits_read > part3_bits && i > big_values_len {
info!("count1 overrun, malformed bitstream");
debug!("count1 overrun, malformed bitstream");
i -= 4;
}
else if bits_read > part3_bits {
// It seems that most other decoders don't undo overruns of the big values. We'll just print
// a message for now.
info!("big_values overrun, malformed bitstream");
debug!("big_values overrun, malformed bitstream");
}

// The final partition after the count1 partition is the rzero partition. Samples in this
Expand Down
4 changes: 2 additions & 2 deletions symphonia-core/src/probe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use crate::formats::{FormatOptions, FormatReader};
use crate::io::{MediaSourceStream, ReadBytes, SeekBuffered};
use crate::meta::{Metadata, MetadataLog, MetadataOptions, MetadataReader};

use log::{debug, error, info};
use log::{debug, error};

mod bloom {

Expand Down Expand Up @@ -276,7 +276,7 @@ impl Probe {

// TODO: Implement scoring.

info!(
debug!(
"found the format marker {:x?} @ {}+{} bytes.",
&context[0..len],
init_pos,
Expand Down

0 comments on commit 08b14a3

Please sign in to comment.