Skip to content

Audio resampler postroll fix - #1615

Merged
NicolasHug merged 4 commits into
mainfrom
audio-resampler-postroll
Aug 12, 2026
Merged

Audio resampler postroll fix#1615
NicolasHug merged 4 commits into
mainfrom
audio-resampler-postroll

Conversation

@NicolasHug

@NicolasHug NicolasHug commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Direct follow-up to #1614 which focused on pre-roll, this one is about post-roll.

Stack created with GitHub Stacks CLIGive Feedback 💬

@pytorch-bot

pytorch-bot Bot commented Aug 11, 2026

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/meta-pytorch/torchcodec/1615

Note: Links to docs will display an error until the docs builds have been completed.

⏳ No Failures, 16 Pending

As of commit d0f3f19 with merge base de0340f (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Aug 11, 2026
@NicolasHug
NicolasHug force-pushed the audio-resampler-postroll branch 2 times, most recently from 2d76f5f to 3c8c927 Compare August 12, 2026 08:11
Base automatically changed from audio-resampler-alignment to main August 12, 2026 08:34
@NicolasHug
NicolasHug force-pushed the audio-resampler-postroll branch from 3c8c927 to 729835d Compare August 12, 2026 08:34
swresample holds back the samples that need input we haven't fed it yet.
maybe_flush_audio_buffers() converts whatever is still held back at the
end of a range, with silence standing in for that input, so those samples
don't match what decoding the stream start to finish produces.

They sit at the very end of what we decoded, and usually fall outside the
requested range and get trimmed away. Not always: decoding stops on the
frame containing stop_seconds, which can end a fraction of a millisecond
after it. Decoding a filter's worth of input further keeps them clear of
the requested range.
@NicolasHug
NicolasHug force-pushed the audio-resampler-postroll branch from 729835d to d0f3f19 Compare August 12, 2026 08:34
@NicolasHug NicolasHug changed the title audio resampler postroll Audio resampler postroll fix Aug 12, 2026
@NicolasHug
NicolasHug merged commit 088c229 into main Aug 12, 2026
80 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant