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.
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
Extend decoding support #4480
Extend decoding support #4480
Changes from 23 commits
7a93080
f0428b5
7292b0e
23c5092
a79cda5
2a827d3
8c5e2d2
29261c4
5595867
eecbb09
6ca3745
3ee2991
4a8b8d9
f07ef9d
87153e9
e0b3e69
7f6db46
666c2b9
5ffaf13
093d0d1
2939e22
eccc2db
624f3c0
4690624
42dffe6
77b7248
f92e8d5
2b24562
b732928
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can replace it with InitAvState().
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CreateAvState
covers some parts of theInitAvState
and some parts of other functions. I would like to decouple the av state manipulation from this code altogether, so I will refactor it during that, if that is fine?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think we can extract this to a function as the same pattern in applied in L291.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, called
CountFrames
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on https://ffmpeg.org/doxygen/trunk/demux_8c_source.html#l00369, 'avformat_close_input' seems to call
avformat_free_context
andavio_close
which callsavio_context_free
. Still please double check this in the version of FFmpeg we use (asan doesn't complain so I think we are not leaking anything).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did that based on the documentation that said that allocation of this context should be freed. Since in this scenario that we use it the wrapping object destructor takes care of it, I removed the call in our code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that sometimes the examples and docs of FFmpeg are not fully accurate.