Reset decodePos in lowlevel decode.

FFmpeg was smart enough to do this for us, but not when we loaded a
savestate.  This is because without a savestate, we returned an initial
small header packet of this size, which gave FFmpeg the idea that seeking
there might help.

But, since we're forcing the decode at a certain position the better thing
is to seek ourselves.
This commit is contained in:
Unknown W. Brackets 2014-05-29 00:16:51 -07:00
parent f29233386c
commit 77b5cb7629

View file

@ -1781,6 +1781,9 @@ int sceAtracLowLevelDecode(int atracID, u32 sourceAddr, u32 sourceBytesConsumedA
u32 sourcebytes = atrac->first.writableBytes;
if (sourcebytes > 0) {
Memory::Memcpy(atrac->data_buf + atrac->first.size, sourceAddr, sourcebytes);
if (atrac->decodePos >= atrac->first.size) {
atrac->decodePos = atrac->first.size;
}
atrac->first.size += sourcebytes;
}