Fixed bugs in new AudioReaderSource class. Also fixed a few small issues in the FFmpegReader class.

This commit is contained in:
Jonathan Thomas
2014-01-29 00:18:40 -06:00
parent 4ee7ef9b6e
commit 74abf40932
4 changed files with 86 additions and 41 deletions

View File

@@ -1290,7 +1290,7 @@ tr1::shared_ptr<Frame> FFmpegReader::CreateFrame(int requested_frame)
else
{
// Create a new frame on the working cache
tr1::shared_ptr<Frame> f(new Frame(requested_frame, info.width, info.height, "#000000", 0, info.channels));
tr1::shared_ptr<Frame> f(new Frame(requested_frame, info.width, info.height, "#000000", Frame::GetSamplesPerFrame(requested_frame, info.fps, info.sample_rate), info.channels));
f->SetPixelRatio(info.pixel_ratio.num, info.pixel_ratio.den);
working_cache.Add(requested_frame, f);