summaryrefslogtreecommitdiff
path: root/src/lib/sndfile_decoder.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-07-11 17:26:16 +0100
committerCarl Hetherington <cth@carlh.net>2013-07-11 17:26:16 +0100
commit39c36075c62ce4c148ce14de0ae7b29d8427be2b (patch)
tree81e90e8065df9c1d68a6e6be646c5825400538dd /src/lib/sndfile_decoder.cc
parent6ff93316d9e89fd649b9fabac258318ed8470007 (diff)
parent8bdc282a88cbd0446b06866b9436c43200886314 (diff)
Merge branch '1.0' of /home/carl/git/dvdomatic into 1.0
Diffstat (limited to 'src/lib/sndfile_decoder.cc')
-rw-r--r--src/lib/sndfile_decoder.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/sndfile_decoder.cc b/src/lib/sndfile_decoder.cc
index 80a6afd2b..8374abbe9 100644
--- a/src/lib/sndfile_decoder.cc
+++ b/src/lib/sndfile_decoder.cc
@@ -35,10 +35,11 @@ using boost::shared_ptr;
SndfileDecoder::SndfileDecoder (shared_ptr<const Film> f, shared_ptr<const SndfileContent> c)
: Decoder (f)
- , AudioDecoder (f)
+ , AudioDecoder (f, c)
, _sndfile_content (c)
, _deinterleave_buffer (0)
{
+ _info.format = 0;
_sndfile = sf_open (_sndfile_content->file().string().c_str(), SFM_READ, &_info);
if (!_sndfile) {
throw DecodeError (_("could not open audio file for reading"));
@@ -89,7 +90,7 @@ SndfileDecoder::pass ()
}
data->set_frames (this_time);
- audio (data, double(_done) / audio_frame_rate());
+ audio (data, _done);
_done += this_time;
_remaining -= this_time;
}