summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-12-18 21:24:17 +0000
committerCarl Hetherington <cth@carlh.net>2013-12-18 21:24:17 +0000
commitff1ab29c3ea270061a54bde529270953e14b9adc (patch)
tree0c2156b850a16f62bc011d7c89fe23a5e823c818 /src
parentde68adffc0311511568484e9ab713bee8826ec2d (diff)
A couple of sndfile fixes for the new world order.
Diffstat (limited to 'src')
-rw-r--r--src/lib/ffmpeg_decoder.cc7
-rw-r--r--src/lib/sndfile_decoder.cc7
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;
}