With a 29.97 source I had problems because the earliest decoder position was
one DCPTime quantum ahead of the last audio time; this looks like it was due to
the content-to-DCP time conversion using 1.001 as the ratio for 30/29.97 rather than
1.001001; I haven't investigated why. This all needs more careful consideration...
audio_fill_towards += DCPTime::from_seconds (earliest->content->audio->delay() / 1000.0);
}
- if (audio_fill_from && audio_fill_from < audio_fill_towards) {
+ if (audio_fill_from && audio_fill_from < audio_fill_towards && ((audio_fill_towards - *audio_fill_from) >= one_video_frame())) {
DCPTimePeriod period (*audio_fill_from, audio_fill_towards);
if (period.duration() > one_video_frame()) {
period.to = period.from + one_video_frame();
Player::emit_audio (shared_ptr<AudioBuffers> data, DCPTime time)
{
Audio (data, time);
- _last_audio_time = time + DCPTime::from_frames (data->frames(), _film->audio_frame_rate ());
+ _last_audio_time = time + DCPTime::from_frames (data->frames(), _film->audio_frame_rate());
}
void