[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Traverso-commit] traverso/src/audiofileio/decode AbstractAudioRe...
From: |
Remon Sijrier |
Subject: |
[Traverso-commit] traverso/src/audiofileio/decode AbstractAudioRe... |
Date: |
Mon, 26 Nov 2007 17:23:14 +0000 |
CVSROOT: /sources/traverso
Module name: traverso
Changes by: Remon Sijrier <r_sijrier> 07/11/26 17:23:14
Modified files:
src/audiofileio/decode: AbstractAudioReader.cpp
Log message:
* problem: invalid destination buffer delete
cause: m_channels != destination buffers real channel count
why ??????????
@ anyone who knows why this can happen: one bonus feature for you! :D
Fixed for now by detecting the 'real' channel count of the destination
buffer on deletion
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/traverso/src/audiofileio/decode/AbstractAudioReader.cpp?cvsroot=traverso&r1=1.19&r2=1.20
Patches:
Index: AbstractAudioReader.cpp
===================================================================
RCS file:
/sources/traverso/traverso/src/audiofileio/decode/AbstractAudioReader.cpp,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -b -r1.19 -r1.20
--- AbstractAudioReader.cpp 30 Oct 2007 15:10:42 -0000 1.19
+++ AbstractAudioReader.cpp 26 Nov 2007 17:23:14 -0000 1.20
@@ -232,6 +232,12 @@
void DecodeBuffer::delete_destination_buffers()
{
if (destination) {
+ int destChannelcount = (sizeof(destination) /
sizeof(destination[0]));
+ if (destChannelcount != m_channels) {
+ PERROR("destination channel count != m_channels: dest
channel %d, m_channels %d", destChannelcount, m_channels);
+ m_channels = destChannelcount;
+ }
+
for (uint chan = 0; chan < m_channels; chan++) {
delete [] destination[chan];
}
- [Traverso-commit] traverso/src/audiofileio/decode AbstractAudioRe...,
Remon Sijrier <=