comparison libnut.c @ 2001:1a3c9056982a libavformat

allocate 32 extra bytes at the end of the probe buffer and remove most probe buf_size checks
author michael
date Sun, 08 Apr 2007 11:34:15 +0000
parents 7460077180aa
children ce70d4ec9e3a
comparison
equal deleted inserted replaced
2000:ce51095f383b 2001:1a3c9056982a
164 .flags = AVFMT_GLOBALHEADER, 164 .flags = AVFMT_GLOBALHEADER,
165 }; 165 };
166 #endif //CONFIG_MUXERS 166 #endif //CONFIG_MUXERS
167 167
168 static int nut_probe(AVProbeData *p) { 168 static int nut_probe(AVProbeData *p) {
169 if (p->buf_size >= ID_LENGTH && !memcmp(p->buf, ID_STRING, ID_LENGTH)) return AVPROBE_SCORE_MAX; 169 if (!memcmp(p->buf, ID_STRING, ID_LENGTH)) return AVPROBE_SCORE_MAX;
170 170
171 return 0; 171 return 0;
172 } 172 }
173 173
174 static size_t av_read(void * h, size_t len, uint8_t * buf) { 174 static size_t av_read(void * h, size_t len, uint8_t * buf) {