From f6bd1fa0bcaf8804122b0a4bdd411ea90d0fed32 Mon Sep 17 00:00:00 2001
From: Julian Harnath <julian.harnath@rwth-aachen.de>
Date: Fri, 23 Nov 2012 00:39:04 +0100
Subject: [PATCH] Fix MixerInput overflow
---
src/add-ons/media/media-add-ons/mixer/MixerInput.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/add-ons/media/media-add-ons/mixer/MixerInput.cpp b/src/add-ons/media/media-add-ons/mixer/MixerInput.cpp
index ec41265..5bb5085 100644
a
|
b
|
MixerInput::BufferReceived(BBuffer* buffer)
|
153 | 153 | start, offset); |
154 | 154 | |
155 | 155 | int in_frames = size / bytes_per_frame(fInput.format.u.raw_audio); |
156 | | double frames = double(in_frames * fMixBufferFrameRate) |
| 156 | double frames = ((double)in_frames * fMixBufferFrameRate) |
157 | 157 | / fInput.format.u.raw_audio.frame_rate; |
158 | 158 | int out_frames = int(frames); |
159 | 159 | fFractionalFrames += frames - double(out_frames); |