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.
This bug got missed in #1802 due to a typo in one of the unit tests causing it to run on the wrong video file. Run on the correct file, the unit test fails, alerting us that copying both the video and audio streams causes a desync between them. The bug may be fixed by adjusting how we adjust timestamps in accordance with
start_timestamp
- instead of having FFmpeg shift all packets forward, then manually shifting back the ones that are direct from the original video (and therefore already takestart_timestamp
into account), we tell FFmpeg to do nothing and manually shift forward packets that aren't from the original video (i.e. only video packets encoded by us). Alternately, we could have added backward shifting to the copied video packets and kept the rest as is, but this results in code duplication and is probably less clear anyway.