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

Add support for ffmpeg's AVCodecContext::delay #1279

Merged
merged 1 commit into from
Feb 16, 2024

Conversation

JoeSchiff
Copy link
Contributor

This :type: int delay variable is currently inaccessible:

I assume this is supposed to be a reference to ffmpeg's AVCodecContext::delay.

This PR creates a property codec_context.delay which references ffmpeg's AVCodecContext::delay.

There is a separate, but similarly named, PyAV property codec.delay which is a reference to ffmpeg's AV_CODEC_CAP_DELAY.
We might want to rename one of these properties to prevent confusion.

Tests

Since the ffmpeg docs for AVCodecContext::delay state "Set by libavcodec.", I was unsure how to test this property. I ended up finding a file in the FATE suite with a detected delay value. I verified the value (312 for this example) using ffprobe.

If this is an acceptable testing strategy, then I could write up more tests to help merge some of the other PRs.

@WyattBlue
Copy link
Member

WyattBlue commented Feb 16, 2024

Thanks! Looks good to me

@WyattBlue WyattBlue merged commit c34aae2 into PyAV-Org:main Feb 16, 2024
18 checks passed
@JoeSchiff JoeSchiff deleted the fix_delay branch January 6, 2025 00:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants