break;
case AV_MMF_TAG_PHRASE_A: /* A melody */
if (dSize < dIndex + AV_MMF_PHRAZE_SIZE_B)
- return ;
+ return;
psPhrase[0].dStartPoint = _mmf_Get4Byte(&(pbBuf[dIndex + 3]));
psPhrase[0].dStopPoint = _mmf_Get4Byte(&(pbBuf[dIndex + 7]));
dIndex += AV_MMF_PHRAZE_SIZE_B;
break;
case AV_MMF_TAG_PHRASE_B: /* B melody */
if (dSize < dIndex + AV_MMF_PHRAZE_SIZE_B)
- return ;
+ return;
psPhrase[1].dStartPoint = _mmf_Get4Byte(&(pbBuf[dIndex + 3]));
psPhrase[1].dStopPoint = _mmf_Get4Byte(&(pbBuf[dIndex + 7]));
dIndex += AV_MMF_PHRAZE_SIZE_B;
break;
case AV_MMF_TAG_PHRASE_E: /* Ending */
if (dSize < dIndex + AV_MMF_PHRAZE_SIZE_B)
- return ;
+ return;
psPhrase[2].dStartPoint = _mmf_Get4Byte(&(pbBuf[dIndex + 3]));
psPhrase[2].dStopPoint = _mmf_Get4Byte(&(pbBuf[dIndex + 7]));
dIndex += AV_MMF_PHRAZE_SIZE_B;
break;
case AV_MMF_TAG_PHRASE_I: /* Intro */
if (dSize < dIndex + AV_MMF_PHRAZE_SIZE_B)
- return ;
+ return;
psPhrase[3].dStartPoint = _mmf_Get4Byte(&(pbBuf[dIndex + 3]));
psPhrase[3].dStopPoint = _mmf_Get4Byte(&(pbBuf[dIndex + 7]));
dIndex += AV_MMF_PHRAZE_SIZE_B;
break;
case AV_MMF_TAG_PHRASE_K: /* Interlude */
if (dSize < dIndex + AV_MMF_PHRAZE_SIZE_B)
- return ;
+ return;
psPhrase[4].dStartPoint = _mmf_Get4Byte(&(pbBuf[dIndex + 3]));
psPhrase[4].dStopPoint = _mmf_Get4Byte(&(pbBuf[dIndex + 7]));
dIndex += AV_MMF_PHRAZE_SIZE_B;
break;
case AV_MMF_TAG_PHRASE_R: /* Refrain */
if (dSize < dIndex + AV_MMF_PHRAZE_SIZE_B)
- return ;
+ return;
psPhrase[5].dStartPoint = _mmf_Get4Byte(&(pbBuf[dIndex + 3]));
psPhrase[5].dStopPoint = _mmf_Get4Byte(&(pbBuf[dIndex + 7]));
dIndex += AV_MMF_PHRAZE_SIZE_B;
break;
case AV_MMF_TAG_PHRASE_S: /* Bridge */
if (dSize < dIndex + AV_MMF_PHRAZE_SIZE_B)
- return ;
+ return;
psPhrase[6].dStartPoint = _mmf_Get4Byte(&(pbBuf[dIndex + 3]));
psPhrase[6].dStopPoint = _mmf_Get4Byte(&(pbBuf[dIndex + 7]));
dIndex += AV_MMF_PHRAZE_SIZE_B;
int sdChunkSize;
if ((psLoad->dSmafType == AV_MMF_SMAF_TYPE_MA1) || (psLoad->dSmafType == AV_MMF_SMAF_TYPE_MA2))
- return ;
+ return;
if ((bCType & 0x0F) == 0x08)
- return ;
+ return;
if (psLoad->dSmafType == AV_MMF_SMAF_TYPE_MA3) {
pbHvData = psLoad->sTrack_Info[5].pbMthv;
}
if ((pbHvData == NULL) || (dHvDataSize < AV_MMF_CHUNK_HEADER_SIZE))
- return ;
+ return;
pbVoice = NULL;
pbScript = NULL;
while (dHvDataSize > (dIndex + AV_MMF_CHUNK_HEADER_SIZE)) {
sdChunkSize = _mmf_MalibNextChunk(&(pbHvData[dIndex]), (dHvDataSize - dIndex),
AVMALIB_CHUNK_PHASE_MTHVSUB, &dChunkID, &dChunkNo);
- if (sdChunkSize < 0) return ;
+ if (sdChunkSize < 0) return;
dIndex += AV_MMF_CHUNK_HEADER_SIZE;
switch (dChunkID) {
case AVMALIB_CHUNKCODE_MHVS:
dIndex += sdChunkSize;
}
+ if (pbSetup == NULL) {
+ debug_error(DEBUG, "pbSetup is NULL.\n");
+ return;
+ }
+
dIndex = 0;
while (dSetupSize >= dIndex + 4) {
wTag = (unsigned short)(((unsigned short)(pbSetup[dIndex]) << 8) + pbSetup[dIndex + 1]);
wSize = (unsigned short)(((unsigned short)(pbSetup[dIndex + 2]) << 8) + pbSetup[dIndex + 3]);
dIndex += 4;
- if (dSetupSize < (dIndex + wSize)) return ;
+ if (dSetupSize < (dIndex + wSize)) return;
if ((wTag == 0x4348) && (wSize == 1)) bHvCh = pbSetup[dIndex];
dIndex += wSize;
}
if ((pbScript == NULL) || (bHvCh >= AV_MMF_HV_CHANNEL_NULL))
- return ;
+ return;
psLoad->sHV_Info.pbVoice = pbVoice;
psLoad->sHV_Info.dVoiceSize = dVoiceSize;
psLoad->sHV_Info.dScriptSize = dScriptSize;
psLoad->sHV_Info.bHvChannel = bHvCh;
- return ;
+ return;
}
/*********************************************************************************