Atrac: Reset the fileoffset only when adding data.

Otherwise, it's only a seek.  For example, a seek to 0, as commonly seen.
This commit is contained in:
Unknown W. Brackets committed 2015-10-24 10:37:14 -07:00
1 parent 8398ac7f77
commit f7fa0a06d4
1 file changed
+3 -2
+3 -2
View File
@@ -1328,9 +1328,10 @@ static u32 sceAtracResetPlayPosition(int atracID, int sample, int bytesWrittenFi
return ATRAC_ERROR_NO_DATA;
} else {
INFO_LOG(ME, "sceAtracResetPlayPosition(%i, %i, %i, %i)", atracID, sample, bytesWrittenFirstBuf, bytesWrittenSecondBuf);
atrac->first.fileoffset = atrac->getFileOffsetBySample(sample);
if (bytesWrittenFirstBuf > 0)
if (bytesWrittenFirstBuf > 0) {
atrac->first.fileoffset = atrac->getFileOffsetBySample(sample);
sceAtracAddStreamData(atracID, bytesWrittenFirstBuf);
}
#ifdef USE_FFMPEG
if ((atrac->codecType == PSP_MODE_AT_3 || atrac->codecType == PSP_MODE_AT_3_PLUS) && atrac->pCodecCtx) {
atrac->SeekToSample(sample);