After 8f42dc5c commit h264_avcC_to_AnnexB_NAL() and hevc_hvcC_to_AnnexB_NAL() are always allocate memory using malloc(). Allocated block assigned to pBuffer and changed initially allocated pointer value. According to OpenMAX specification, OMX component should not free this buffer and it will leak.
Furthermore, OMX component may rely on initially allocated buffer address.
Copying the data into the original buffer and free temporary memory block should fix both issues.
VideoLAN code repository instance