Convert deprecated cython extension class properties to new syntax part 4 #1291
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.
I had some trouble with the
color_range
property in av/video/codeccontext.pyx and tests/test_colorspace.py.After my changes,
stream.color_range
now returns2
instead ofNone
and therefore fails the test. I have no idea which one is actually correct.Here is some additional context which may or may not be related:
I get this warning when opening the file used in tests/test_colorspace.py:
container = av.open(fate_suite("amv/MTV_high_res_320x240_sample_Penguin_Joke_MTV_from_WMV.amv"))
WARNING libav.avi:test_colorspace.py:9 scale/rate is 0/0 which is invalid. (This file has been generated by broken software.)
The
color_range
property in av/video/codeccontext.pyx had unusal syntax. The decorator was used, but so was__get__
and__set__
.There are two
color_range
data fields in ffmpeg:AVCodecContext::color_range
https://ffmpeg.org//doxygen/6.0/structAVCodecContext.html#a255bf7100a4ba6dcb6ee5d87740a4f35
AVFrame::color_range
https://ffmpeg.org//doxygen/6.0/structAVFrame.html#a853afbad220bbc58549b4860732a3aa5
I'll do more research in the next few days, unless the solution is obvious to someone already.