Skip to content

FilmCraft: An open-source, nonlinear video editor written by scratch in pure Rust

Merge pull request #1099 from haranishi/fix/913-subclip-audio

Brandon Thomas8ea545b10326
diff --cc crates/engine/src/commands.rs
index a193eb035,33b2b1040..8a0362092
--- a/crates/engine/src/commands.rs
+++ b/crates/engine/src/commands.rs
@@@ -2279,9 -2201,10 +2280,10 @@@ fn build() -> Vec<CommandSpec>
return Err(bad("timeline.place", "enable video, audio, or both"));
}
let item = item_p(p, "item").ok_or_else(|| bad("timeline.place", "need `item`"))?;
- let at = time_p(s, p, "").unwrap_or(s.playhead());
+ let at = sequence_time_p(s, p, "", "timeline.place")?.unwrap_or(s.playhead());
let tg = s.targeting();
let pi = s.project.item(item).ok_or_else(|| bad("timeline.place", "no such item"))?;
+ let (has_video, has_audio) = s.project.source_streams(item);
let is_audio = |t: TrackId| s.active_sequence().is_some_and(|q| q.audio_tracks.iter().any(|x| x.id == t));
// `track` is where the picture goes and `audioTrack` where the sound goes. A caller that
// names an audio track as `track` asks for the sound alone, on that track.