Fixed symlink bug which made FFmpeg unable to load the video #7
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.
When creating a symlink of the source video by passing the option
do_not_copy=True
toVideoHash()
, the link is created using the source video as-is for the target, even if it's relative to the current directory. A target in a link, however, needs to be either absolute or relative to the link otherwise it won't be valid and, in this case, FFmpeg will not be able to load the video giving an error.Example previously:
Example now:
This PR fixes both this issue, and an issue in which the program crashes if FFmpeg is not able
to load a video and compute its duration, now an exception is thrown.
The majority of the diffs are due to
black
, which was run as mentioned in the contributing guidelines. The core of this PR is the commit b29af5a.