summaryrefslogtreecommitdiff
path: root/src/lib/audio_decoder.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-02-16 21:54:01 +0000
committerCarl Hetherington <cth@carlh.net>2018-02-16 21:54:01 +0000
commita8855402f9bc9815b10405ff68c313f4a4584651 (patch)
tree9dab0c174986615e425d7acb33c84769e1380879 /src/lib/audio_decoder.cc
parent34d07e62e2ca021a304cf56a3262e1e288cf0e6a (diff)
AudioDecoder::_positions is at the resampled rate, if applicable;
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.
Diffstat (limited to 'src/lib/audio_decoder.cc')
-rw-r--r--src/lib/audio_decoder.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/audio_decoder.cc b/src/lib/audio_decoder.cc
index 4bd6535d8..c0f00780a 100644
--- a/src/lib/audio_decoder.cc
+++ b/src/lib/audio_decoder.cc
@@ -66,7 +66,7 @@ AudioDecoder::emit (AudioStreamPtr stream, shared_ptr<const AudioBuffers> data,
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;