diff options
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/ffmpeg_decoder.cc | 7 | ||||
| -rw-r--r-- | src/lib/sndfile_decoder.cc | 7 |
2 files changed, 4 insertions, 10 deletions
diff --git a/src/lib/ffmpeg_decoder.cc b/src/lib/ffmpeg_decoder.cc index b2e8cc44a..866d846db 100644 --- a/src/lib/ffmpeg_decoder.cc +++ b/src/lib/ffmpeg_decoder.cc @@ -141,13 +141,6 @@ FFmpegDecoder::flush () if (_ffmpeg_content->audio_stream() && _decode_audio) { decode_audio_packet (); } - -#if 0 - /* XXX */ - /* Stop us being asked for any more data */ - _video_position = _ffmpeg_content->video_length (); - _audio_position = _ffmpeg_content->audio_length (); -#endif } bool diff --git a/src/lib/sndfile_decoder.cc b/src/lib/sndfile_decoder.cc index 3af683c57..432f73f0d 100644 --- a/src/lib/sndfile_decoder.cc +++ b/src/lib/sndfile_decoder.cc @@ -94,7 +94,7 @@ SndfileDecoder::pass () } data->set_frames (this_time); - audio (data, _done); + audio (data, _done * TIME_HZ / audio_frame_rate ()); _done += this_time; _remaining -= this_time; @@ -123,6 +123,7 @@ void SndfileDecoder::seek (ContentTime t, bool accurate) { Decoder::seek (t, accurate); - - /* XXX */ + + _done = t * audio_frame_rate() / TIME_HZ; + _remaining = _info.frames - _done; } |
