avcodec/hevc: Silence "warning: ref0/1 may be used uninitialized in this function"

Also make code more robust by initializing the pointers to NULL

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
