-
Notifications
You must be signed in to change notification settings - Fork 315
Fix #410 slow metadata save not closing resources #411
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
base: master
Are you sure you want to change the base?
Conversation
Nirostar
commented
Apr 16, 2020
- Change Java Version to 8 because of org.jcodec.api.transcode.SinkImpl using java.lang.reflect.Parameter
- Close inputs at slow metadata save and delete and then move. This also fixes the test testKeyedWriteSlow() (on Windows)
* Change Java Version to 8 because of org.jcodec.api.transcode.SinkImpl using java.lang.reflect.Parameter * Close inputs at slow metadata save and delete and then move. This also fixes the test testKeyedWriteSlow() (on Windows)
|
Is something wrong with this pull request? |
| <encoding>UTF-8</encoding> | ||
| <source>1.6</source> | ||
| <target>1.6</target> | ||
| <source>8</source> |
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 wouldn't change the source version. We try to keep the code backwards compatible. IMO there's no reason we might need the features of java 8.
svitvitskiy
left a comment
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.
Please see my comments
|
|
||
| for (int i = 0; i < tracks.length; i++) { | ||
| writers[i].apply(); | ||
| writers[i].close(); |
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.
Close should be handled outside of this code.
| flattenChannel(movie, out); | ||
| } finally { | ||
| if (out != null) | ||
| out.close(); |
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 we are already closing the file right here, so that should be sufficient.
# Conflicts: # src/main/java/org/jcodec/containers/mp4/ChunkWriter.java # src/main/java/org/jcodec/movtool/Flatten.java