Fixes valgrind uninitialized value warnings at the end of decoding H.264
frames.
Originally committed as revision 16230 to svn://svn.ffmpeg.org/ffmpeg/trunk
}
bufidx = h->nal_unit_type == NAL_DPC ? 1 : 0; // use second escape buffer for inter data
- h->rbsp_buffer[bufidx]= av_fast_realloc(h->rbsp_buffer[bufidx], &h->rbsp_buffer_size[bufidx], length);
+ h->rbsp_buffer[bufidx]= av_fast_realloc(h->rbsp_buffer[bufidx], &h->rbsp_buffer_size[bufidx], length+FF_INPUT_BUFFER_PADDING_SIZE);
dst= h->rbsp_buffer[bufidx];
if (dst == NULL){
dst[di++]= src[si++];
}
+ memset(dst+di, 0, FF_INPUT_BUFFER_PADDING_SIZE);
+
*dst_length= di;
*consumed= si + 1;//+1 for the header
//FIXME store exact number of bits in the getbitcontext (it is needed for decoding)