mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-15 10:40:01 +01:00
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:
1 parent
8398ac7f77
commit
f7fa0a06d4
1 file changed
+3
-2
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user