Skip to content

Commit

Permalink
Make logging match dav1d (#1338)
Browse files Browse the repository at this point in the history
  • Loading branch information
rinon authored Sep 4, 2024
2 parents 4843f6f + d7c08cf commit 7d72409
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ use crate::src::internal::Rav1dTaskContextTaskThread;
use crate::src::internal::TaskThreadData;
use crate::src::iter::wrapping_iter;
use crate::src::log::Rav1dLog as _;
use crate::src::log::Rav1dLogger;
use crate::src::obu::rav1d_parse_obus;
use crate::src::obu::rav1d_parse_sequence_header;
use crate::src::picture::rav1d_picture_alloc_copy;
Expand Down Expand Up @@ -119,7 +120,7 @@ impl Default for Rav1dSettings {
all_layers: true,
frame_size_limit: 0,
allocator: Default::default(),
logger: Default::default(),
logger: Some(Rav1dLogger::default()),
strict_std_compliance: false,
output_invisible_frames: false,
inloop_filters: Rav1dInloopFilterType::all(),
Expand Down
2 changes: 1 addition & 1 deletion src/obu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2460,7 +2460,7 @@ fn parse_obus(
Some(Rav1dObuType::Padding) => {} // Ignore OBUs we don't care about.
None => {
// Print a warning, but don't fail for unknown types.
let len = gb.len();
let len = gb.remaining_len();
writeln!(c.logger, "Unknown OBU type {raw_type} of size {len}");
}
}
Expand Down

0 comments on commit 7d72409

Please sign in to comment.