Repository navigation
Conversation
|
Looks like a good catch, can you please add a test exercising this condition? |
|
Hopefully the test is clear. I hope I got the test directory correct. |
bcd348b to
4f90dc4
Compare
| # Ensure that all stream properties have sensible values even | ||
| # if writing to the stream hasn't started yet | ||
| with av.open(self.sandboxed("output.mp4"), "w") as container: | ||
| stream = container.add_stream('h264') |
There was a problem hiding this comment.
Why is the type unknown when we add a stream?
Could this be related to #1062 ?
There was a problem hiding this comment.
It could be. I believe that it is because the codec context is only "opened" on first use.
TBH, I only noticedthis since accessing the __repr__ when running my code interactively cause things to crash.
There was a problem hiding this comment.
You are correct, with #1062 (and my "fix" removed) applied I should update this test with:
diff --git a/tests/test_streams.py b/tests/test_streams.py
index efee029..496d32d 100644
--- a/tests/test_streams.py
+++ b/tests/test_streams.py
@@ -45,4 +45,4 @@ class TestStreams(TestCase):
assert stream.duration is None
assert stream.frames == 0
assert stream.language is None
- assert stream.type is None
+ assert stream.type == 'video'
4f90dc4 to
e7d3507
Compare
|
PR #1062 is going to land if CI doesn't blow up. This still leaves us with the valid segfault you've spotted, but now I'm not sure how to test it anymore.. |
|
I'm not sure it is so valid anymore. If the pointer is guaranteed to exist, then it is likely that the code is ok right? I |
|
Selfishly, i would much rather you spend your precious time helping us resolve #1045 |
|
So #1083 shows that these changes are no longer necessary |
No description provided.