source: branches/perian-1.1/Patches/ffmpeg-h264nal-valgrind-warning.diff @ 962

Revision 962, 887 bytes checked in by astrange, 6 years ago (diff)

Copy G3 fix from trunk and add some minor optimizations/memory bug fixes to the ffmpeg patches.

  • ffmpeg/libavcodec/h264.c

     
    13851385    } 
    13861386 
    13871387    bufidx = h->nal_unit_type == NAL_DPC ? 1 : 0; // use second escape buffer for inter data 
    1388     h->rbsp_buffer[bufidx]= av_fast_realloc(h->rbsp_buffer[bufidx], &h->rbsp_buffer_size[bufidx], length); 
     1388    h->rbsp_buffer[bufidx]= av_fast_realloc(h->rbsp_buffer[bufidx], &h->rbsp_buffer_size[bufidx], length+FF_INPUT_BUFFER_PADDING_SIZE); 
    13891389    dst= h->rbsp_buffer[bufidx]; 
    13901390 
    13911391    if (dst == NULL){ 
     
    14091409        dst[di++]= src[si++]; 
    14101410    } 
    14111411 
     1412    memset(dst+di, 0, FF_INPUT_BUFFER_PADDING_SIZE); 
     1413 
    14121414    *dst_length= di; 
    14131415    *consumed= si + 1;//+1 for the header 
    14141416//FIXME store exact number of bits in the getbitcontext (it is needed for decoding) 
Note: See TracBrowser for help on using the repository browser.