aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2008-07-11 15:12:44 +0000
committerMichael Niedermayer <michaelni@gmx.at>2008-07-11 15:12:44 +0000
commit876ef93d99c01bad849fb39a40d099944a2881d5 (patch)
tree8b394d3fd2a5b8d89acada83f24db8f321efa732 /libavformat
parent6e264d45bc66cdef5027c072ca1d93f43261fa21 (diff)
downloadffmpeg-876ef93d99c01bad849fb39a40d099944a2881d5.tar.gz
simplify
Originally committed as revision 14168 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/psxstr.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/libavformat/psxstr.c b/libavformat/psxstr.c
index f090cd4349..469a2c40c5 100644
--- a/libavformat/psxstr.c
+++ b/libavformat/psxstr.c
@@ -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)
{
- int start;
- uint8_t *sector;
+ uint8_t *sector= p->buf;
if (p->buf_size < RAW_CD_SECTOR_SIZE)
return 0;
@@ -76,14 +75,11 @@ static int str_probe(AVProbeData *p)
(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)