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:
authorJörg Müller <nexyon@gmail.com>2021-08-30 23:36:02 +0300
committerJörg Müller <nexyon@gmail.com>2021-09-18 22:45:33 +0300
commitbdbc7e12a02e15ad7265dfc1ac21fb6d0016308f (patch)
treee9b967deb25f77eef348786f5cd22524eef0ec20 /source/blender/imbuf
parent970c928f27106b26ec7cf6afa2316c60384ab4f1 (diff)
Audaspace: added audio file streams functionality.
On the blender side this commit fixes importing video files with audio and video streams that do not share the same start time and duration. Differential Revision: https://developer.blender.org/D12353
Diffstat (limited to 'source/blender/imbuf')
-rw-r--r--source/blender/imbuf/intern/anim_movie.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/source/blender/imbuf/intern/anim_movie.c b/source/blender/imbuf/intern/anim_movie.c
index dbca16ca82b..13f9356751e 100644
--- a/source/blender/imbuf/intern/anim_movie.c
+++ b/source/blender/imbuf/intern/anim_movie.c
@@ -664,11 +664,6 @@ static int startffmpeg(struct anim *anim)
anim->duration_in_frames = (int)(stream_dur * av_q2d(frame_rate) + 0.5f);
}
- double ctx_start = 0;
- if (pFormatCtx->start_time != AV_NOPTS_VALUE) {
- ctx_start = (double)pFormatCtx->start_time / AV_TIME_BASE;
- }
-
frs_num = frame_rate.num;
frs_den = frame_rate.den;
@@ -683,7 +678,7 @@ static int startffmpeg(struct anim *anim)
anim->frs_sec_base = frs_den;
/* Save the relative start time for the video. IE the start time in relation to where playback
* starts. */
- anim->start_offset = video_start - ctx_start;
+ anim->start_offset = video_start;
anim->params = 0;