Add support for ffmpeg's AVCodecContext::delay #1279
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This :type: int
delay
variable is currently inaccessible:PyAV/include/libavcodec/avcodec.pxd
Line 192 in 8e32fe7
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'sAVCodecContext::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.