getting transitions to work

This commit is contained in:
itsmattkc
2018-08-06 11:53:03 +10:00
parent c6571d7f99
commit ef8b30e7ea
3 changed files with 88 additions and 35 deletions
+3 -1
View File
@@ -89,9 +89,11 @@ void ReplaceClipMediaDialog::replace() {
c->clip_in = 0;
}
int new_type = get_type_from_tree(new_item);
c->media = new_media;
c->media_type = new_type;
if (get_type_from_tree(new_item) == MEDIA_TYPE_FOOTAGE) {
if (new_type == MEDIA_TYPE_FOOTAGE) {
// TODO: the media streams may be invalid, here we have a BASIC heuristic for getting the right ones that COULD BE BETTER
Media* casted_new_media = static_cast<Media*>(new_media);
c->media_stream = (c->track < 0) ? casted_new_media->video_tracks.at(0)->file_index : casted_new_media->audio_tracks.at(0)->file_index;