# HG changeset patch # User michael # Date 1215789164 0 # Node ID 82f150c809c6514d3c1961f27082c53897332deb # Parent 44699ecd5f6f00727e23ddd1941a406c9d45a556 simplify diff -r 44699ecd5f6f -r 82f150c809c6 psxstr.c --- a/psxstr.c Fri Jul 11 15:10:58 2008 +0000 +++ b/psxstr.c Fri Jul 11 15:12:44 2008 +0000 @@ -66,8 +66,7 @@ static int str_probe(AVProbeData *p) { - int start; - uint8_t *sector; + uint8_t *sector= p->buf; if (p->buf_size < RAW_CD_SECTOR_SIZE) return 0; @@ -76,14 +75,11 @@ (AV_RL32(&p->buf[8]) == CDXA_TAG)) { /* RIFF header seen; skip 0x2C bytes */ - start = RIFF_HEADER_SIZE; - } else - start = 0; - - sector= p->buf + start; + sector += RIFF_HEADER_SIZE; + } /* 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; if(sector[0x11] >= 32)