Skip to content
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

Avoid receiving undesired packets #503

Merged
merged 1 commit into from
Feb 7, 2025

Conversation

NicolasHug
Copy link
Member

@NicolasHug NicolasHug commented Feb 7, 2025

This avoids receiving undesired packets when calling av_read_frame(). This saves 643 useless packets from being received on our nasa video.

I was hoping we could remove/simplify a bit our do/while

} while (packet->stream_index != activeStreamIndex_);

and just do

TORCH_CHECK(packet->stream_index == activeStreamIndex_);'

but while most tests are passing, some still fail. I suspect FFmpeg just doesn't fully respect the DISCARD flag under some specific conditions (that I haven't investigated).

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label Feb 7, 2025
@scotts
Copy link
Contributor

scotts commented Feb 7, 2025

Great catch again!

@NicolasHug NicolasHug merged commit 6e9267b into pytorch:main Feb 7, 2025
47 of 48 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.

3 participants