diff options
author | Joshua Leung <aligorith@gmail.com> | 2016-01-08 08:30:26 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2016-01-08 08:32:39 +0300 |
commit | 4846b4402433738c3483749a7e72fbb82be41e61 (patch) | |
tree | 02992f90ef90dc7ac0b4ea78e0a26ca1cddbe756 /source/blender/blenkernel/intern/sequencer.c | |
parent | cd6c6ee1a54ec0eed33592bcb7e499ce5141d4ac (diff) |
Sequencer: Use movieclip framerate when importing new movie strips
When importing new movie strips into the sequencer, the scene's frame rate
will now be adjusted to match that of the movie being loaded by default.
To get the old behaviour (e.g. if importing a clip into an existing project),
disable the "Use Movie Framerate" option in the file browser when selecting
the strip.
This change is designed to solve the common problem that users trying to import
video clips will forget to adjust the frame rate before importing the clip, thus
causing the sound and video strips to be out of sync (as the sound strip ends
up longer/shorter than the video stream).
Diffstat (limited to 'source/blender/blenkernel/intern/sequencer.c')
-rw-r--r-- | source/blender/blenkernel/intern/sequencer.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index 588f591b2d1..831f330d78e 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -5249,6 +5249,11 @@ Sequence *BKE_sequencer_add_movie_strip(bContext *C, ListBase *seqbasep, SeqLoad seq->anim_preseek = IMB_anim_get_preseek(anim_arr[0]); BLI_strncpy(seq->name + 2, "Movie", SEQ_NAME_MAXSTR - 2); BKE_sequence_base_unique_name_recursive(&scene->ed->seqbase, seq); + + /* adjust scene's frame rate settings to match */ + if (seq_load->flag & SEQ_LOAD_SYNC_FPS) { + IMB_anim_get_fps(anim_arr[0], &scene->r.frs_sec, &scene->r.frs_sec_base, true); + } /* basic defaults */ seq->strip = strip = MEM_callocN(sizeof(Strip), "strip"); |