ac97snd: fix processing of >64K ID3 tags

git-svn-id: svn://kolibrios.org@5485 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
CleverMouse 2015-02-27 15:25:40 +00:00
parent f5fda14ecf
commit 8b0a0fb369
2 changed files with 11 additions and 2 deletions

View File

@ -761,9 +761,10 @@ DWORD test_m3u(char *buf) //Asper+
DWORD test_mp3(char *buf)
{ unsigned long hdr;
WAVEHEADER whdr;
int attempts = 0;
while (1)
{ if(rd.filepos > 102400)
for (;;attempts++)
{ if(attempts > 1000)
return 0;
if(!rd.head_read(&rd,&hdr))
return 0;

View File

@ -949,9 +949,17 @@ int parse_new_id3(struct reader *rd, unsigned long header)
return -1;
if(rd->strremain < length)
{
rd->filepos += length - rd->strremain;
rd->strremain = 0;
}
else
{
rd->strpos+=length;
rd->stream+=length;
rd->strremain-=length;
}
#if 0
/* skip if unknown version/scary flags, parse otherwise */