With the ubiquitous application of Internet and wireless networks, H.264 video communication becomes more and more popular. However, due to the high-efficiently predictive coding and the variable length entropy coding, it is more sensitive to transmission errors. Error concealment (EC) is just an approach to utilize the spatial and temporal correlations to conceal the corrupted region. In this paper, first we propose variable block size error concealment (VBSEC) scheme inspired by variable block size motion estimation (VBSME) in H.264. This scheme provides four EC modes and four sub-block partitions. The whole corrupted macro-block (MB) will be divided into variable block size adaptively according to the actual motion. More precise motion vectors (MV) will be predicted for each sub-block. Then MV refinement (MVR) scheme is proposed to refine the MV of the heterogeneous sub-block by utilizing three step search (TSS) algorithm adaptively. Both VBSEC and MVR are based on our improved spatio-temporal boundary matching algorithm (STBMA). By utilizing these schemes, we can reconstruct the corrupted MB in the inter frame more accurately. The experimental results show that our proposed scheme can obtain maximum PSNR gain up to 1.82dB and 1.52dB, respectively compared with the boundary matching algorithm (BMA) adopted in the JM11.0 reference software and STBMA.