fix its initial setup. Fixes problems when seeking deep into
resampled content; before this commit the audio time stamps got
out of whack sufficiently that the butler would fill with video
before any audio made it past the range checks.
silence (_content->delay ());
}
time += ContentTime::from_seconds (_content->delay() / 1000.0);
- _positions[stream] = time.frames_round (stream->frame_rate ());
+ _positions[stream] = time.frames_round (_content->resampled_frame_rate ());
}
shared_ptr<Resampler> resampler;
void silence (int milliseconds);
boost::shared_ptr<const AudioContent> _content;
- /** Frame after the last one that was emitted from Data for each AudioStream */
+ /** Frame after the last one that was emitted from Data (i.e. at the resampled rate, if applicable)
+ * for each AudioStream.
+ */
std::map<AudioStreamPtr, Frame> _positions;
std::map<AudioStreamPtr, boost::shared_ptr<Resampler> > _resamplers;