allocate 32 extra bytes at the end of the probe buffer and remove most probe buf_size checks
Originally committed as revision 8677 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
@@ -429,7 +429,7 @@ int av_open_input_file(AVFormatContext **ic_ptr, const char *filename,
|
||||
for(probe_size= PROBE_BUF_MIN; probe_size<=PROBE_BUF_MAX && !fmt; probe_size<<=1){
|
||||
int score= probe_size < PROBE_BUF_MAX ? AVPROBE_SCORE_MAX/4 : 0;
|
||||
/* read probe data */
|
||||
pd->buf= av_realloc(pd->buf, probe_size);
|
||||
pd->buf= av_realloc(pd->buf, probe_size + AVPROBE_PADDING_SIZE);
|
||||
pd->buf_size = get_buffer(pb, pd->buf, probe_size);
|
||||
if (url_fseek(pb, 0, SEEK_SET) < 0) {
|
||||
url_fclose(pb);
|
||||
|
Reference in New Issue
Block a user