Hi, x264_realloc is buggy, fixing it would fix the issue : - i_old_size = *( (int*) ( (uint8_t*) p ) - sizeof( void ** ) - - sizeof( int ) ); + i_old_size = *( (int*) ( (uint8_t*) p - sizeof( void ** ) - + sizeof( int ) ) ); Regards, Mathieu Note : x264_realloc is not used in the trunk, so that fix fix nothing.