avcodec/fic: Check available input space for cursor