Merge remote-tracking branch 'origin/stable' into dev
Conflicts: src/plugins/plugins.pro Change-Id: Ieec8b5984b0fba97872bf96c38410369dc0e20cf
This commit is contained in:
@@ -244,16 +244,18 @@ bool QWaveDecoder::enoughDataAvailable()
|
||||
bool QWaveDecoder::findChunk(const char *chunkId)
|
||||
{
|
||||
chunk descriptor;
|
||||
if (!peekChunk(&descriptor))
|
||||
return false;
|
||||
|
||||
if (qstrncmp(descriptor.id, chunkId, 4) == 0)
|
||||
return true;
|
||||
do {
|
||||
if (!peekChunk(&descriptor))
|
||||
return false;
|
||||
|
||||
if (qstrncmp(descriptor.id, chunkId, 4) == 0)
|
||||
return true;
|
||||
|
||||
// It's possible that bytes->available() is less than the chunk size
|
||||
// if it's corrupt.
|
||||
junkToSkip = qint64(sizeof(chunk) + descriptor.size);
|
||||
|
||||
// It's possible that bytes->available() is less than the chunk size
|
||||
// if it's corrupt.
|
||||
junkToSkip = qint64(sizeof(chunk) + descriptor.size);
|
||||
while (source->bytesAvailable() > 0) {
|
||||
// Skip the current amount
|
||||
if (junkToSkip > 0)
|
||||
discardBytes(junkToSkip);
|
||||
@@ -263,12 +265,7 @@ bool QWaveDecoder::findChunk(const char *chunkId)
|
||||
if (junkToSkip > 0)
|
||||
return false;
|
||||
|
||||
if (!peekChunk(&descriptor))
|
||||
return false;
|
||||
|
||||
if (qstrncmp(descriptor.id, chunkId, 4) == 0)
|
||||
return true;
|
||||
}
|
||||
} while (source->bytesAvailable() > 0);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user