Commit d5a7a0f3 authored by michael's avatar michael

simplify


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@14168 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 51c57e4a
...@@ -66,8 +66,7 @@ static const char sync_header[12] = {0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf ...@@ -66,8 +66,7 @@ static const char sync_header[12] = {0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf
static int str_probe(AVProbeData *p) static int str_probe(AVProbeData *p)
{ {
int start; uint8_t *sector= p->buf;
uint8_t *sector;
if (p->buf_size < RAW_CD_SECTOR_SIZE) if (p->buf_size < RAW_CD_SECTOR_SIZE)
return 0; return 0;
...@@ -76,14 +75,11 @@ static int str_probe(AVProbeData *p) ...@@ -76,14 +75,11 @@ static int str_probe(AVProbeData *p)
(AV_RL32(&p->buf[8]) == CDXA_TAG)) { (AV_RL32(&p->buf[8]) == CDXA_TAG)) {
/* RIFF header seen; skip 0x2C bytes */ /* RIFF header seen; skip 0x2C bytes */
start = RIFF_HEADER_SIZE; sector += RIFF_HEADER_SIZE;
} else }
start = 0;
sector= p->buf + start;
/* look for CD sync header (00, 0xFF x 10, 00) */ /* look for CD sync header (00, 0xFF x 10, 00) */
if (memcmp(p->buf+start,sync_header,sizeof(sync_header))) if (memcmp(sector,sync_header,sizeof(sync_header)))
return 0; return 0;
if(sector[0x11] >= 32) if(sector[0x11] >= 32)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment