[xiph-commits] r12384 - trunk/xiph-qt/common
arek at svn.xiph.org
arek at svn.xiph.org
Tue Jan 23 18:37:39 PST 2007
Author: arek
Date: 2007-01-23 18:37:37 -0800 (Tue, 23 Jan 2007)
New Revision: 12384
Modified:
trunk/xiph-qt/common/XCACodec.cpp
Log:
Align data on a frame boundary.
Modified: trunk/xiph-qt/common/XCACodec.cpp
===================================================================
--- trunk/xiph-qt/common/XCACodec.cpp 2007-01-23 17:48:36 UTC (rev 12383)
+++ trunk/xiph-qt/common/XCACodec.cpp 2007-01-24 02:37:37 UTC (rev 12384)
@@ -72,6 +72,10 @@
} else {
if (ioInputDataByteSize < bytesToCopy)
bytesToCopy = ioInputDataByteSize;
+
+ // align the data on a frame boundary
+ bytesToCopy -= bytesToCopy % mInputFormat.mBytesPerFrame;
+
AudioStreamPacketDescription gen_pd = {0, bytesToCopy / mInputFormat.mBytesPerFrame, bytesToCopy};
dbg_printf(" -__- :: %d: %ld [%ld]\n", 0, gen_pd.mDataByteSize, gen_pd.mVariableFramesInPacket);
InPacket(inInputData, &gen_pd);
More information about the commits
mailing list