Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Parborg <darkdefende@gmail.com>2021-07-09 16:06:06 +0300
committerJeroen Bakker <jeroen@blender.org>2021-08-23 12:17:55 +0300
commit9511009438deba9b5ca453f3a14b9cd67b6852a5 (patch)
tree56930c2da3292a1c14a1667280fac9be9c516674
parentab572f3ac1b4708553e1ff22320f8c531fed7f75 (diff)
VSE: Fix "off by one" error when encoding audio
Before we didn't encode the audio up until the current frame. This lead to us not encoding the last video frame of audio. Reviewed By: Richard Antalik Differential Revision: http://developer.blender.org/D11918
-rw-r--r--source/blender/blenkernel/intern/writeffmpeg.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c
index be90660983b..5ab9bdcbee6 100644
--- a/source/blender/blenkernel/intern/writeffmpeg.c
+++ b/source/blender/blenkernel/intern/writeffmpeg.c
@@ -1433,8 +1433,9 @@ int BKE_ffmpeg_append(void *context_v,
}
# ifdef WITH_AUDASPACE
- write_audio_frames(context,
- (frame - start_frame) / (((double)rd->frs_sec) / (double)rd->frs_sec_base));
+ /* Add +1 frame because we want to encode audio up until the next video frame. */
+ write_audio_frames(
+ context, (frame - start_frame + 1) / (((double)rd->frs_sec) / (double)rd->frs_sec_base));
# endif
return success;
}