DCPTime t = _last_audio_time;
while (t < length) {
DCPTime block = min (DCPTime::from_seconds (0.5), length - t);
- shared_ptr<AudioBuffers> silence (new AudioBuffers (_film->audio_channels(), block.frames_round(_film->audio_frame_rate())));
- silence->make_silent ();
- Audio (silence, t);
+ Frame const samples = block.frames_round(_film->audio_frame_rate());
+ if (samples) {
+ shared_ptr<AudioBuffers> silence (new AudioBuffers (_film->audio_channels(), samples));
+ silence->make_silent ();
+ Audio (silence, t);
+ }
t += block;
}
return;
}
+ FrameRateChange frc(piece->content->active_video_frame_rate(), _film->video_frame_rate());
+ if (frc.skip && (video.frame % 2) == 1) {
+ return;
+ }
+
/* Time and period of the frame we will emit */
DCPTime const time = content_video_to_dcp (piece, video.frame);
DCPTimePeriod const period (time, time + DCPTime::from_frames (1, _film->video_frame_rate()));