Call SDL_WM_SetIcon before SDL_SetVideoMode as suggested by the docs.