+ if (ignore ()) {
+ return;
+ }
+
+ if (_positions[stream] == 0) {
+ _positions[stream] = time.frames_round (stream->frame_rate ());
+ }
+
+ Data (stream, ContentAudio (data, _positions[stream]));
+ _positions[stream] += data->frames();
+}
+
+ContentTime
+AudioDecoder::position () const
+{
+ optional<ContentTime> p;
+ for (map<AudioStreamPtr, Frame>::const_iterator i = _positions.begin(); i != _positions.end(); ++i) {
+ ContentTime const ct = ContentTime::from_frames (i->second, i->first->frame_rate ());
+ if (!p || ct < *p) {
+ p = ct;
+ }
+ }
+
+ return p.get_value_or(ContentTime());