Skip to content

Commit

Permalink
extend MLP major header retrieval to 10 sectors ahead
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabrice Nicol committed Aug 27, 2020
1 parent 8780339 commit 8f74fa9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Binary file modified local.w10/dvda-author.exe
Binary file not shown.
8 changes: 4 additions & 4 deletions src/ats2wav.c
Original file line number Diff line number Diff line change
Expand Up @@ -384,9 +384,9 @@ inline static int peek_pes_packet_audio(WaveData *info, WaveHeader* header,
// This is useless unless the first pack AOB header is broken or lacking
// and a forensic try at extraction is performed

uint8_t buff[2048] = {0};
int res = fread(buff, 1, 2048, info->infile.fp);
if (res != 2048) // last sector, just return
uint8_t buff[2048*10] = {0};
int res = fread(buff, 1, 2048*10, info->infile.fp);
if (res != 2048*10) // last sector, just return
{
fseek(info->infile.fp, offset0, SEEK_SET);
return position;
Expand All @@ -395,7 +395,7 @@ inline static int peek_pes_packet_audio(WaveData *info, WaveHeader* header,

short int count = 0;
bool err = false;
while ((err = audit_mlp_header(buff + count, &decinfo, false, globals)) == false && count < 2040)
while ((err = audit_mlp_header(buff + count, &decinfo, false, globals)) == false && count < 2040*10)
{
++count;
}
Expand Down

0 comments on commit 8f74fa9

Please sign in to comment.