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 getter/setter for global_header #1816

Closed

Conversation

daveisfera
Copy link
Contributor

If there's not a better option, then this is the fix for #1814 (creating this so I can test a fully integrated build)

@WyattBlue
Copy link
Member

This is not necessary, you can already read/write ptr.flags:

from av.codec.context import Flags

video.codec_context.flags |= Flags.global_header

Even if this is a common operator, your PR would need proper type hints and a basic test.

@daveisfera
Copy link
Contributor Author

Awesome! This is what I was looking for and couldn't figure out.

Writing down how to clear the flag in case other stumble on this:

video.codec_context.flags &= ~Flags.global_header

@daveisfera daveisfera closed this Mar 12, 2025
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