Revision 9be51815

View differences:

libavformat/utils.c
445 445
            /* read probe data */
446 446
            pd->buf= av_realloc(pd->buf, probe_size + AVPROBE_PADDING_SIZE);
447 447
            pd->buf_size = get_buffer(pb, pd->buf, probe_size);
448
            memset(pd->buf+pd->buf_size, 0, AVPROBE_PADDING_SIZE);
448 449
            if (url_fseek(pb, 0, SEEK_SET) < 0) {
449 450
                url_fclose(pb);
450 451
                if (url_fopen(pb, filename, URL_RDONLY) < 0) {
......
1866 1867

  
1867 1868
            if (st->codec->codec_id == CODEC_ID_NONE) {
1868 1869
                AVProbeData *pd = &(probe_data[st->index]);
1869
                pd->buf = av_realloc(pd->buf, pd->buf_size+pkt->size);
1870
                pd->buf = av_realloc(pd->buf, pd->buf_size+pkt->size+AVPROBE_PADDING_SIZE);
1870 1871
                memcpy(pd->buf+pd->buf_size, pkt->data, pkt->size);
1871 1872
                pd->buf_size += pkt->size;
1873
                memset(pd->buf+pd->buf_size, 0, AVPROBE_PADDING_SIZE);
1872 1874
            }
1873 1875
        }
1874 1876
        if(st->parser && st->parser->parser->split && !st->codec->extradata){

Also available in: Unified diff