-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
aac: refactor approximate frame count, fuzzy fixes #343
base: dev-0.6
Are you sure you want to change the base?
Conversation
symphonia-codec-aac/src/adts.rs
Outdated
if source.seek(SeekFrom::Start(cur_pos)).is_err() { | ||
break; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch for an optimization! However, I think ignore_bytes
will work even better since the MSS will decide if it should just consume from it's internal ring buffer or resort to an actual seek. In other words, you can just ignore_bytes(header.frame_len)
.
symphonia-codec-aac/src/adts.rs
Outdated
@@ -428,34 +428,48 @@ fn approximate_frame_count(mut source: &mut MediaSourceStream<'_>) -> Result<Opt | |||
else { | |||
// The number of points to sample within the stream. | |||
const NUM_SAMPLE_POINTS: u64 = 4; | |||
const NUM_FRAMES: u32 = 100; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A slightly more descriptive name.
const NUM_FRAMES: u32 = 100; | |
const NUM_FRAMES_PER_SAMPLE: u32 = 100; |
Thanks for suggestion. |
refactored aac aproximate_frame_count() method. It had some issues which causes panic. Should fix cases from https://github.com/qarmin/Automated-Fuzzer/actions/runs/12516290494 (REPORTS___SYMPHONIA*)
I haven't tested on VBR aac to observe any improvements, It was #196 (comment) approximate method is not perfect there