mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-24 05:49:58 +00:00
Mpeg: Initialize esBuffer to safer values.
Makes the audio work properly in Dan Ball Senki W (#4786.)
This commit is contained in:
parent
c03f6c23ed
commit
74d40115a0
@ -1320,7 +1320,9 @@ static int sceMpegInitAu(u32 mpeg, u32 bufferAddr, u32 auPointer)
|
||||
|
||||
if (bufferAddr >= 1 && bufferAddr <= (u32)MPEG_DATA_ES_BUFFERS && ctx->esBuffers[bufferAddr - 1]) {
|
||||
// This esbuffer has been allocated for Avc.
|
||||
sceAu.esBuffer = bufferAddr; // Can this be right??? not much of a buffer pointer..
|
||||
// Default to 0, since we stuff the stream id in here. Technically, we shouldn't.
|
||||
// TODO: Do something better to track the AU data. This used to be bufferAddr.
|
||||
sceAu.esBuffer = 0;
|
||||
sceAu.esSize = MPEG_AVC_ES_SIZE;
|
||||
sceAu.dts = 0;
|
||||
sceAu.pts = 0;
|
||||
@ -1328,7 +1330,9 @@ static int sceMpegInitAu(u32 mpeg, u32 bufferAddr, u32 auPointer)
|
||||
sceAu.write(auPointer);
|
||||
} else {
|
||||
// This esbuffer has been left as Atrac.
|
||||
sceAu.esBuffer = bufferAddr;
|
||||
// Default to 0, since we stuff the stream id in here. Technically, we shouldn't.
|
||||
// TODO: Do something better to track the AU data. This used to be bufferAddr.
|
||||
sceAu.esBuffer = 0;
|
||||
sceAu.esSize = MPEG_ATRAC_ES_SIZE;
|
||||
sceAu.pts = 0;
|
||||
sceAu.dts = UNKNOWN_TIMESTAMP;
|
||||
|
Loading…
Reference in New Issue
Block a user