extremely limited speed support implemented #120

This commit is contained in:
itsmattkc
2018-10-01 14:51:36 +10:00
parent c21a21c219
commit ac153e4cff
14 changed files with 143 additions and 91 deletions
+6 -1
View File
@@ -114,8 +114,13 @@ bool get_clip_frame(Clip* c, long playhead) {
// do we need to update the texture?
MediaStream* ms = static_cast<Media*>(c->media)->get_stream_from_file_index(c->track < 0, c->media_stream);
// backwards compatibilty code
if (c->frame_rate == 0) {
c->frame_rate = ms->video_frame_rate;
}
long sequence_clip_time = playhead - c->timeline_in + c->clip_in;
long clip_time = refactor_frame_number(sequence_clip_time, c->sequence->frame_rate, ms->video_frame_rate);
long clip_time = refactor_frame_number(sequence_clip_time, c->sequence->frame_rate, c->frame_rate);
AVFrame* current_frame = NULL;
bool no_frame = false;