hevc: fix memory leak
hevc: remove warnings detectedby clang